From 151eafb0192957c489fa5b8010c081eb6db5f925 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Wed, 23 Mar 2011 16:43:39 -0500 Subject: Remove need to import each individual logger constant Signed-off-by: Dan McGee --- devel/management/commands/reporead.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/devel/management/commands/reporead.py b/devel/management/commands/reporead.py index 0c83555..8ce6eab 100644 --- a/devel/management/commands/reporead.py +++ b/devel/management/commands/reporead.py @@ -35,12 +35,10 @@ try: except ImportError: pass -from logging import ERROR, WARNING, INFO, DEBUG - from main.models import Arch, Package, PackageDepend, PackageFile, Repo logging.basicConfig( - level=WARNING, + level=logging.WARNING, format='%(asctime)s -> %(levelname)s: %(message)s', datefmt='%Y-%m-%d %H:%M:%S', stream=sys.stderr) @@ -69,11 +67,11 @@ class Command(BaseCommand): v = int(options.get('verbosity', 0)) if v == 0: - logger.level = ERROR + logger.level = logging.ERROR elif v == 1: - logger.level = INFO + logger.level = logging.INFO elif v == 2: - logger.level = DEBUG + logger.level = logging.DEBUG import signal, traceback handler = lambda sig, stack: traceback.print_stack(stack) -- cgit v1.2.3-24-g4f1b