File tree Expand file tree Collapse file tree 2 files changed +14
-2
lines changed Expand file tree Collapse file tree 2 files changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -395,6 +395,11 @@ def _release(self):
395
395
self ._lock_file_fd = None
396
396
fcntl .flock (fd , fcntl .LOCK_UN )
397
397
os .close (fd )
398
+
399
+ try :
400
+ os .remove (self ._lock_file )
401
+ except OSError :
402
+ pass
398
403
return None
399
404
400
405
# Soft lock
Original file line number Diff line number Diff line change 38
38
import filelock
39
39
40
40
41
+ PY2 = sys .version_info [0 ] == 2
42
+ PY3 = sys .version_info [0 ] == 3
43
+
44
+
41
45
class ExThread (threading .Thread ):
42
46
43
47
def __init__ (self , * args , ** kargs ):
@@ -55,8 +59,11 @@ def run(self):
55
59
def join (self ):
56
60
threading .Thread .join (self )
57
61
if self .ex is not None :
58
- wrapper_ex = self .ex [1 ]
59
- raise (wrapper_ex .__class__ , wrapper_ex , self .ex [2 ])
62
+ if PY3 :
63
+ raise self .ex [0 ].with_traceback (self .ex [1 ], self .ex [2 ])
64
+ elif PY2 :
65
+ wrapper_ex = self .ex [1 ]
66
+ raise (wrapper_ex .__class__ , wrapper_ex , self .ex [2 ])
60
67
return None
61
68
62
69
You can’t perform that action at this time.
0 commit comments