mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-06 22:47:29 -06: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
1 changed files with 1 additions and 2 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue