gitignore: files generated by unitests

This commit is contained in:
Noam Meltzer 2015-12-26 19:34:05 +02:00
parent 7734c1d6a6
commit 17dae68654
2 changed files with 8 additions and 1 deletions

7
.gitignore vendored
View file

@ -61,3 +61,10 @@ target/
# Sublime Text 2
*.sublime*
# unitests files
telegram.mp3
telegram.mp4
telegram.ogg
telegram.png
telegram.webp

View file

@ -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