summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2011-03-23 22:43:39 +0100
committerDan McGee <dan@archlinux.org>2011-03-23 22:43:39 +0100
commit151eafb0192957c489fa5b8010c081eb6db5f925 (patch)
tree3a3fbbf8778a33b3f7b592db530f009424d65e11
parent1942a9da6c8165c10c0914bcab522a59d15a1cc5 (diff)
downloadarchweb-151eafb0192957c489fa5b8010c081eb6db5f925.tar.gz
archweb-151eafb0192957c489fa5b8010c081eb6db5f925.tar.xz
Remove need to import each individual logger constant
Signed-off-by: Dan McGee <dan@archlinux.org>
-rw-r--r--devel/management/commands/reporead.py10
1 files 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)