Adding debug

This commit is contained in:
Anton Hvornum 2019-11-27 22:17:34 +00:00
parent 198ba06c27
commit d4c2fd61aa
1 changed files with 4 additions and 1 deletions

View File

@ -817,7 +817,10 @@ def setup_args_defaults(args, interactive=True):
if not 'country' in args:
country = None
if get_default_gateway_linux():
country = guess_country(get_external_ip())
ip = get_external_ip()
print('IP:', ip)
country = guess_country(ip)
print('Country:', country)
args['country'] = 'all' if not country else country
if not 'localtime' in args: args['localtime'] = 'Europe/Stockholm' if args['country'] == 'SE' else 'GMT+0' # TODO: Arbitrary for now