Skip to content

Commit 5a0c505

Browse files
committed
Fixed famebuffer exception
- Version 4.3.4 - Added explicit message
1 parent 322166b commit 5a0c505

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

AndroidViewClient/src/com/dtmilano/android/adb/adbclient.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
@author: Diego Torres Milano
1818
'''
1919

20-
__version__ = '4.3.3'
20+
__version__ = '4.3.4'
2121

2222
import sys
2323
import socket
@@ -322,13 +322,15 @@ def takeSnapshot(self, reconnect=False):
322322
received = self.__receive(1 * 4 + 12 * 4)
323323
(version, bpp, size, width, height, roffset, rlen, boffset, blen, goffset, glen, aoffset, alen) = struct.unpack('<' + 'L' * 13, received)
324324
mode = [None]*4
325+
alen = 0
325326
try:
326327
mode[roffset/rlen] = 'R'
327328
mode[boffset/blen] = 'B'
328329
mode[goffset/glen] = 'G'
329330
mode[aoffset/alen] = 'A'
330331
except ZeroDivisionError, ex:
331-
raise ValueError("Unexpected 0 len in framebuffer description: " + ex)
332+
raise ValueError("Unexpected 0 len in framebuffer description: %s.\nframebuffer: %s" % \
333+
(ex, ','.join([str(v) for v in (version, bpp, size, width, height, roffset, rlen, boffset, blen, goffset, glen, aoffset, alen)])))
332334
mode = ''.join(mode)
333335
if DEBUG:
334336
print >> sys.stderr, " takeSnapshot:", (version, bpp, size, width, height, roffset, rlen, boffset, blen, goffset, blen, aoffset, alen)

0 commit comments

Comments
 (0)