Don't show INFO: when not doing verbose runs

This commit is contained in:
Daniel Martí 2014-02-09 12:39:43 +01:00
parent ec0de6b370
commit d949b9ffbb
1 changed files with 6 additions and 2 deletions

8
fdroid
View File

@ -58,8 +58,12 @@ def main():
verbose = any(s in sys.argv for s in ['-v', '--verbose'])
logging.basicConfig(format='%(levelname)s: %(message)s',
level=logging.DEBUG if verbose else logging.INFO)
if verbose:
logging.basicConfig(format='%(levelname)s: %(message)s',
level=logging.DEBUG)
else:
logging.basicConfig(format='%(message)s',
level=logging.INFO)
# Trick optparse into displaying the right usage when --help is used.
sys.argv[0] += ' ' + command