Skip to content

Commit

Permalink
Log args
Browse files Browse the repository at this point in the history
  • Loading branch information
casperlamboo committed Nov 2, 2023
1 parent c986e97 commit 7f77b0c
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions cura/CuraApplication.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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"
Expand Down

0 comments on commit 7f77b0c

Please sign in to comment.