mirror of
https://github.com/python-telegram-bot/python-telegram-bot.git
synced 2024-11-21 14:46:29 +01:00
gitignore: files generated by unitests
This commit is contained in:
parent
7734c1d6a6
commit
17dae68654
2 changed files with 8 additions and 1 deletions
7
.gitignore
vendored
7
.gitignore
vendored
|
@ -61,3 +61,10 @@ target/
|
|||
|
||||
# Sublime Text 2
|
||||
*.sublime*
|
||||
|
||||
# unitests files
|
||||
telegram.mp3
|
||||
telegram.mp4
|
||||
telegram.ogg
|
||||
telegram.png
|
||||
telegram.webp
|
||||
|
|
|
@ -749,6 +749,6 @@ class Bot(TelegramObject):
|
|||
def _valid_token(token):
|
||||
"""a very basic validation on token"""
|
||||
left, sep, _right = token.partition(':')
|
||||
if (sep is None) or (not left.isdigit()) or (len(left) < 3):
|
||||
if (not sep) or (not left.isdigit()) or (len(left) < 3):
|
||||
raise TelegramError('Invalid token')
|
||||
return token
|
||||
|
|
Loading…
Reference in a new issue