From 7f77b0c2a4e56c4cd5b71583370652fbbfd92def Mon Sep 17 00:00:00 2001 From: "c.lamboo" Date: Wed, 1 Nov 2023 17:44:01 +0100 Subject: [PATCH] Log args --- cura/CuraApplication.py | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/cura/CuraApplication.py b/cura/CuraApplication.py index 722a728863f..6dbcf487d7f 100755 --- a/cura/CuraApplication.py +++ b/cura/CuraApplication.py @@ -129,6 +129,20 @@ numpy.seterr(all = "ignore") +import urllib.request as urlreq +from io import StringIO as strio + + +class PyProtoHandler(urlreq.BaseHandler): + def python_open(self, req): + fullUrl = req.get_full_url() + Logger.log("i", "LOOKFORTHIS %s", fullUrl) + return strio(fullUrl) + + +opener = urlreq.build_opener(PyProtoHandler()) +urlreq.install_opener(opener) + class CuraApplication(QtApplication): # SettingVersion represents the set of settings available in the machine/extruder definitions. # You need to make sure that this version number needs to be increased if there is any non-backwards-compatible @@ -165,6 +179,16 @@ def __init__(self, *args, **kwargs): tray_icon_name = "cura-icon-32.png" if not ApplicationMetadata.IsAlternateVersion else "cura-icon-32_wip.png", **kwargs) + try: + Logger.info("AAAAAAAAAA") + Logger.info(sys.argv) + urlArg = sys.argv[1] + Logger.info("BBBBBBBBBB") + urlreq.urlopen(urlArg) + except Exception as e: + print("ERROR: %s" % e) + pass + self.default_theme = "cura-light" self.change_log_url = "https://ultimaker.com/ultimaker-cura-latest-features?utm_source=cura&utm_medium=software&utm_campaign=cura-update-features"