implement -q and -v for fdroid server

The --quiet and --verbose options that are standard with the fdroid tools
were not implemented yet with the `server` command.
This commit is contained in:
Hans-Christoph Steiner 2014-04-15 20:47:03 -04:00
parent 5ce3b61a2a
commit d1cd817759
2 changed files with 30 additions and 12 deletions

View file

@ -115,6 +115,13 @@ def read_config(opts, config_file='config.py'):
if k in config:
write_password_file(k)
# since this is used with rsync, where trailing slashes have meaning,
# ensure there is always a trailing slash
if 'serverwebroot' in config:
if config['serverwebroot'][-1] != '/':
config['serverwebroot'] += '/'
config['serverwebroot'] = config['serverwebroot'].replace('//', '/')
return config
def write_password_file(pwtype, password=None):