More debug

merge-requests/30/head
Bob Mottram 2022-03-11 14:38:47 +00:00
parent aa93a15c8a
commit ff2aa1564e
1 changed files with 8 additions and 7 deletions

View File

@ -1427,10 +1427,10 @@ def _detect_users_path(url: str) -> str:
return '/users/' return '/users/'
def get_actor_json(hostDomain: str, handle: str, http: bool, gnunet: bool, def get_actor_json(host_domain: str, handle: str, http: bool, gnunet: bool,
debug: bool, quiet: bool, debug: bool, quiet: bool,
signing_priv_key_pem: str, signing_priv_key_pem: str,
existingSession) -> ({}, {}): existing_session) -> ({}, {}):
"""Returns the actor json """Returns the actor json
""" """
if debug: if debug:
@ -1513,8 +1513,8 @@ def get_actor_json(hostDomain: str, handle: str, http: bool, gnunet: bool,
http_prefix = 'https' http_prefix = 'https'
else: else:
http_prefix = 'http' http_prefix = 'http'
if existingSession: if existing_session:
session = existingSession session = existing_session
else: else:
session = create_session(proxy_type) session = create_session(proxy_type)
if nickname == 'inbox': if nickname == 'inbox':
@ -1541,11 +1541,12 @@ def get_actor_json(hostDomain: str, handle: str, http: bool, gnunet: bool,
handle = nickname + '@' + domain handle = nickname + '@' + domain
wf_request = webfinger_handle(session, handle, wf_request = webfinger_handle(session, handle,
http_prefix, cached_webfingers, http_prefix, cached_webfingers,
hostDomain, __version__, debug, host_domain, __version__, debug,
group_account, signing_priv_key_pem) group_account, signing_priv_key_pem)
if not wf_request: if not wf_request:
if not quiet: if not quiet:
print('get_actor_json Unable to webfinger ' + handle) print('get_actor_json Unable to webfinger ' + handle +
' ' + http_prefix + ' proxy: ' + str(proxy_type))
return None, None return None, None
if not isinstance(wf_request, dict): if not isinstance(wf_request, dict):
if not quiet: if not quiet:
@ -1600,7 +1601,7 @@ def get_actor_json(hostDomain: str, handle: str, http: bool, gnunet: bool,
} }
person_json = \ person_json = \
get_json(signing_priv_key_pem, session, person_url, as_header, get_json(signing_priv_key_pem, session, person_url, as_header,
None, debug, __version__, http_prefix, hostDomain, None, debug, __version__, http_prefix, host_domain,
20, quiet) 20, quiet)
if person_json: if person_json:
if not quiet: if not quiet: