fix bug raises while formatting

fix too many values to unpack issue through after formatting
This commit is contained in:
Mahendra 2018-03-20 16:21:50 +05:30
parent c590738471
commit 395acdb09b
No known key found for this signature in database
GPG Key ID: A672D8FAAEE398B3

View File

@ -253,13 +253,13 @@ def decodeAddress(address):
bytesUsedByStreamNumber:-4]
if len(embeddedRipeData) == 19:
return status, addressVersionNumber, streamNumber, \
'\x00', embeddedRipeData
'\x00' + embeddedRipeData
elif len(embeddedRipeData) == 20:
return status, addressVersionNumber, streamNumber, \
embeddedRipeData
elif len(embeddedRipeData) == 18:
return status, addressVersionNumber, streamNumber, \
'\x00\x00', embeddedRipeData
'\x00\x00' + embeddedRipeData
elif len(embeddedRipeData) < 18:
return 'ripetooshort', 0, 0, ""
elif len(embeddedRipeData) > 20:
@ -281,7 +281,7 @@ def decodeAddress(address):
else:
x00string = '\x00' * (20 - len(embeddedRipeData))
return status, addressVersionNumber, streamNumber,\
x00string, embeddedRipeData
x00string + embeddedRipeData
def addBMIfNotPresent(address):