From 5fe626c6cc8444603cf7ae5199271b69d38ff255 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Thu, 9 Jun 2011 16:17:42 -0500 Subject: Management command cleanup Now that we aren't seeing odd segfaults and hung tasks, we can remove the traceback stuff from the scripts. Also use the 'io' module only, it has been long enough. Signed-off-by: Dan McGee --- mirrors/management/commands/mirrorcheck.py | 5 ----- 1 file changed, 5 deletions(-) (limited to 'mirrors/management/commands/mirrorcheck.py') diff --git a/mirrors/management/commands/mirrorcheck.py b/mirrors/management/commands/mirrorcheck.py index ea43d558..7bd79c83 100644 --- a/mirrors/management/commands/mirrorcheck.py +++ b/mirrors/management/commands/mirrorcheck.py @@ -45,11 +45,6 @@ class Command(NoArgsCommand): elif v == 2: logger.level = logging.DEBUG - import signal, traceback - handler = lambda sig, stack: traceback.print_stack(stack) - signal.signal(signal.SIGQUIT, handler) - signal.signal(signal.SIGUSR1, handler) - return check_current_mirrors() def check_mirror_url(mirror_url): -- cgit v1.2.3-2-g168b From 110c79ad0637c8e35b18c9ccc201d33d456d5453 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Tue, 16 Aug 2011 14:23:57 -0500 Subject: Small Python convention fixup Signed-off-by: Dan McGee --- mirrors/management/commands/mirrorcheck.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mirrors/management/commands/mirrorcheck.py') diff --git a/mirrors/management/commands/mirrorcheck.py b/mirrors/management/commands/mirrorcheck.py index 7bd79c83..8eb8b010 100644 --- a/mirrors/management/commands/mirrorcheck.py +++ b/mirrors/management/commands/mirrorcheck.py @@ -68,7 +68,7 @@ def check_mirror_url(mirror_url): log.last_sync = parsed_time # if we couldn't parse a time, this is a failure - if parsed_time == None: + if parsed_time is None: log.error = "Could not parse time from lastsync" log.is_success = False log.duration = end - start -- cgit v1.2.3-2-g168b