utils.validater: remove dead code

This commit is contained in:
Noam Meltzer 2016-04-25 09:53:48 +03:00
parent 05a90dc3bc
commit 02243f6fda

View file

@ -21,24 +21,6 @@
from telegram.error import InvalidToken
try:
type(basestring)
except NameError:
basestring = str
def validate_string(arg, name):
"""
Validate a string argument. Raises a ValueError if `arg` is neither an
instance of basestring (Python 2) or str (Python 3) nor None.
Args:
arg (basestring): The value to be tested
name (str): The name of the argument, for the error message
"""
if not isinstance(arg, basestring) and arg is not None:
raise ValueError(name + ' is not a string')
def validate_token(token):
"""a very basic validation on token"""