fix UserWarning

This commit is contained in:
penn5 2020-08-23 15:29:13 +01:00 committed by GitHub
parent bc799fd82c
commit 8908a72378
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -155,7 +155,7 @@ class AuthMethods:
'not login to the bot account using the provided '
'bot_token (it may not be using the user you expect)'
)
elif not callable(phone) and phone != me.phone:
elif phone and not callable(phone) and "".join(c for c in str(phone) if c in string.digits) != me.phone:
warnings.warn(
'the session already had an authorized user so it did '
'not login to the user account using the provided '