Python : Fix generation of QR Code.

This commit is contained in:
Schimon Jehudah, Adv. 2024-10-22 20:27:29 +03:00
parent 7a01c43a57
commit 4c9621972a

View file

@ -611,7 +611,6 @@ class HttpInstance:
if jid_kind: if jid_kind:
# Action and instance type # Action and instance type
action, instance = XmppUtilities.set_action_instance_type(jid_kind, node_name) action, instance = XmppUtilities.set_action_instance_type(jid_kind, node_name)
link_href = XmppUtilities.get_link_href(jid_bare, jid_kind, node_name)
view_href = XmppUtilities.get_view_href(jid_bare, jid_kind, node_name) view_href = XmppUtilities.get_view_href(jid_bare, jid_kind, node_name)
xmpp_uri = XmppUtilities.get_xmpp_uri(jid_bare, jid_kind, node_name) xmpp_uri = XmppUtilities.get_xmpp_uri(jid_bare, jid_kind, node_name)
else: # jid_info['error'] else: # jid_info['error']
@ -619,13 +618,15 @@ class HttpInstance:
instance = view_href = '' instance = view_href = ''
message = '{}: {} (XEP-0030)'.format(jid_info['text'], jid_info['condition']) message = '{}: {} (XEP-0030)'.format(jid_info['text'], jid_info['condition'])
xmpp_uri = jid_bare xmpp_uri = jid_bare
link_href = XmppUtilities.get_link_href(jid_bare, jid_kind, node_name)
# Query URI links # Query URI links
print('Query URI links') print('Query URI links')
links = XmppUtilities.get_query_uri_links(jid_bare, jid_kind, node_name) links = XmppUtilities.get_query_uri_links(jid_bare, jid_kind, node_name)
# Graphic files # Graphic files
filename, filepath, filetype, selection = FileUtilities.handle_photo(jid_bare, jid_vcard, link_href) filename, filepath, filetype, selection = FileUtilities.handle_photo(
jid_bare, jid_vcard, link_href)
#except Exception as e: #except Exception as e:
else: else:
@ -720,7 +721,7 @@ class HttpInstance:
return response return response
@self.app.exception_handler(403) @self.app.exception_handler(403)
def not_found_exception_handler(request: Request, exc: HTTPException): def access_denied_exception_handler(request: Request, exc: HTTPException):
action = 'Warning' action = 'Warning'
title = 'Access Denied' title = 'Access Denied'
return result_get(request, action, title) return result_get(request, action, title)