Skip to content
This repository was archived by the owner on Mar 12, 2020. It is now read-only.

Commit 231a4c1

Browse files
authored
fixed when removing tmp files
1 parent 51237d0 commit 231a4c1

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

SQLToolsModels.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -289,8 +289,12 @@ def stop(self):
289289
Log.debug("Your command is taking too long to run. Process killed")
290290
except Exception:
291291
pass
292-
if self.tmp and os.path.exists(self.tmp.name):
293-
os.unlink(self.tmp.name)
292+
try:
293+
if self.tmp and os.path.exists(self.tmp.name):
294+
os.unlink(self.tmp.name)
295+
except Exception:
296+
Log.debug("Failed to remove tmp file" + self.tmp.name)
297+
pass
294298

295299
class Utils:
296300
@staticmethod

0 commit comments

Comments
 (0)