From c821cdd9c70973d275726ac8d1456304a085e048 Mon Sep 17 00:00:00 2001 From: Calum Lind Date: Wed, 27 Apr 2016 09:10:31 +0100 Subject: [PATCH] [UI] Fix unable to use uppercase log level --- deluge/ui/baseargparser.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/deluge/ui/baseargparser.py b/deluge/ui/baseargparser.py index 7047a32ca..6996a5695 100644 --- a/deluge/ui/baseargparser.py +++ b/deluge/ui/baseargparser.py @@ -105,8 +105,8 @@ class BaseArgParser(argparse.ArgumentParser): help=_("Set the config directory path")) self.group.add_argument("-l", "--logfile", metavar="", help=_("Output to specified logfile instead of stdout")) - self.group.add_argument("-L", "--loglevel", choices=deluge.log.levels, metavar="", - help=_("Set the log level (none, error, warning, info, debug)")) + self.group.add_argument("-L", "--loglevel", choices=[l for k in deluge.log.levels for l in (k, k.upper())], + help=_("Set the log level (none, error, warning, info, debug)"), metavar="") self.group.add_argument("--logrotate", nargs="?", const="2M", metavar="", help=_("Enable logfile rotation, with optional maximum logfile size, " "default: %(const)s (Logfile rotation count is 5)"))