Skip to content

Commit

Permalink
[fix] handle phone numbers of type long
Browse files Browse the repository at this point in the history
refs #2664

On python2 a long phone will have type 'long' instead of 'int' which
will cause an error during construction of phone storage dir
  • Loading branch information
tgalal committed Apr 23, 2019
1 parent 69a94fd commit 7007d57
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion yowsup/common/tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ def constructPath(*path):

@staticmethod
def getStorageForPhone(phone):
if type(phone) is int:
if type(phone) is not str:
phone = str(phone)
return StorageTools.constructPath(phone + '/')

Expand Down

0 comments on commit 7007d57

Please sign in to comment.