Skip to content

Commit

Permalink
Don't parse sys.argv manually when we're already using argparse
Browse files Browse the repository at this point in the history
  • Loading branch information
Mathieu Bridon authored and pypingou committed Oct 3, 2012
1 parent 6a4b61f commit 636dd45
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions fedora_active_user.py
Expand Up @@ -45,11 +45,6 @@
# Initial simple logging stuff
logging.basicConfig()
log = logging.getLogger("pkgdb")
if '--debug' in sys.argv:
log.setLevel(logging.DEBUG)
#pkgdbclient.debug = True
elif '--verbose' in sys.argv:
log.setLevel(logging.INFO)


_table_keys = {
Expand Down Expand Up @@ -393,6 +388,13 @@ def main():
parser = setup_parser()
args = parser.parse_args()

global log
if args.debug:
log.setLevel(logging.DEBUG)
#pkgdbclient.debug = True
elif args.verbose:
log.setLevel(logging.INFO)

try:
if args.username and not args.nofas:
_get_last_website_login(args.username)
Expand Down

0 comments on commit 636dd45

Please sign in to comment.