From 129cc8e6e916533ff51a5d65721cf904542a1c27 Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Mon, 10 Oct 2016 10:12:01 +0300 Subject: fix Pylint warnings --- bin/track_status.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'bin/track_status.py') 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( -- cgit v1.2.3