Adjusted text unpack so that output is converted from tuple to string.

This commit is contained in:
ultramagnus_tcv 2015-10-19 19:43:39 -05:00
parent a4510e2d62
commit 3d348670fa
1 changed files with 3 additions and 2 deletions

View File

@ -5,7 +5,8 @@ def readUnpack(bytes, **options):
if options.get("type") == 't':
#print 'DEBUG: In t'
SOS = SOSfile.read(bytes)
return unpack('%ss' % bytes, SOS)
text_unpacked = unpack('%ss' % bytes, SOS)
return ''.join(text_unpacked)
if options.get("type") == 'b':
#print 'DEBUG: In b', bytes
@ -23,7 +24,7 @@ print("\033c");
SOSfile = open('SOSCFFA.DRIVER', 'rb')
filetype = readUnpack(8, type = 't')
if 'SOS DRVR' in filetype:
if filetype == 'SOS DRVR':
print "This is a proper SOS file."
print "Filetype is: %s." % (filetype)
else: