From 7acc88e848a86778084b0fda48ac96b38e6516a2 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Wed, 1 May 2024 11:22:31 +0100 Subject: [PATCH] Remove default function argument --- daemon.py | 9 ++++++--- qrcode.py | 2 +- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/daemon.py b/daemon.py index 3b6cd5978..0cfbc9f63 100644 --- a/daemon.py +++ b/daemon.py @@ -584,6 +584,7 @@ class EpicyonServer(ThreadingHTTPServer): thrNewswireWatchdog = None thrFederatedSharesWatchdog = None thrFederatedBlocksDaemon = None + qrcode_scale = 6 def handle_error(self, request, client_address): # surpress connection reset errors @@ -1124,12 +1125,14 @@ def run_daemon(no_of_books: int, httpd.domain = domain httpd.port = port httpd.domain_full = get_full_domain(domain, port) + httpd.qrcode_scale = 6 if onion_domain: - save_domain_qrcode(base_dir, 'http', onion_domain) + save_domain_qrcode(base_dir, 'http', onion_domain, httpd.qrcode_scale) elif i2p_domain: - save_domain_qrcode(base_dir, 'http', i2p_domain) + save_domain_qrcode(base_dir, 'http', i2p_domain, httpd.qrcode_scale) else: - save_domain_qrcode(base_dir, http_prefix, httpd.domain_full) + save_domain_qrcode(base_dir, http_prefix, httpd.domain_full, + httpd.qrcode_scale) clear_person_qrcodes(base_dir) httpd.http_prefix = http_prefix httpd.debug = debug diff --git a/qrcode.py b/qrcode.py index d8e5c56c4..fa74a2974 100644 --- a/qrcode.py +++ b/qrcode.py @@ -11,7 +11,7 @@ import pyqrcode def save_domain_qrcode(base_dir: str, http_prefix: str, - domain_full: str, scale: int = 6) -> None: + domain_full: str, scale: int) -> None: """Saves a qrcode image for the domain name This helps to transfer onion or i2p domains to a mobile device """