mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-11 04:09:01 +08:00
Move f.close() into try:
In case urlopen() fails, e.g. because of a missing internet connection, f will be indefined.
This commit is contained in:
parent
8f450d0d2f
commit
eb6abdf773
@ -99,7 +99,6 @@ class SliceInfo(Extension):
|
||||
try:
|
||||
f = urllib.request.urlopen(self.info_url, data = binary_data, timeout = 1)
|
||||
Logger.log("i", "Sent anonymous slice info to %s", self.info_url)
|
||||
f.close()
|
||||
except Exception as e:
|
||||
Logger.logException("e", e)
|
||||
|
||||
f.close()
|
||||
|
Loading…
x
Reference in New Issue
Block a user