diff options
author | Egor Tensin <Egor.Tensin@gmail.com> | 2016-10-10 10:12:01 +0300 |
---|---|---|
committer | Egor Tensin <Egor.Tensin@gmail.com> | 2016-10-10 10:12:01 +0300 |
commit | 129cc8e6e916533ff51a5d65721cf904542a1c27 (patch) | |
tree | 67c85c362b756ffcc46f509b299319959c1ff2fa /bin/track_status.py | |
parent | fix licensing notices (diff) | |
download | vk-scripts-129cc8e6e916533ff51a5d65721cf904542a1c27.tar.gz vk-scripts-129cc8e6e916533ff51a5d65721cf904542a1c27.zip |
fix Pylint warnings
Diffstat (limited to 'bin/track_status.py')
-rw-r--r-- | bin/track_status.py | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/bin/track_status.py b/bin/track_status.py index 84495f9..e59b0e1 100644 --- a/bin/track_status.py +++ b/bin/track_status.py @@ -12,20 +12,20 @@ from vk.tracking.db import Format as DatabaseFormat DEFAULT_TIMEOUT = StatusTracker.DEFAULT_TIMEOUT DEFAULT_DB_FORMAT = DatabaseFormat.CSV -def _parse_positive_integer(s): +def _parse_positive_integer(src): try: - x = int(s) + n = int(src) except ValueError: - raise argparse.ArgumentTypeError('must be a positive integer: ' + s) - if x < 1: - raise argparse.ArgumentTypeError('must be a positive integer: ' + s) - return x + raise argparse.ArgumentTypeError('must be a positive integer: ' + src) + if n < 1: + raise argparse.ArgumentTypeError('must be a positive integer: ' + src) + return n -def _parse_database_format(s): +def _parse_database_format(src): try: - return DatabaseFormat(s) + return DatabaseFormat(src) except ValueError: - raise argparse.ArgumentTypeError('invalid database format: ' + s) + raise argparse.ArgumentTypeError('invalid database format: ' + src) def _parse_args(args=sys.argv): parser = argparse.ArgumentParser( |