File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 14
14
def load_library (filename ):
15
15
"""Loads a shared library."""
16
16
lib = None
17
- if os . path . exists (filename ):
17
+ if Path ( filename ). exists ():
18
18
lib = cdll .LoadLibrary (filename )
19
19
return lib
20
20
@@ -64,7 +64,7 @@ def create_library_copy(self):
64
64
self .prefix ,
65
65
str (copy_number ),
66
66
self .shared_library_name )
67
- new_filename = str (Path (temp_directory ) / filename )
67
+ new_filename = str (Path (temp_directory , filename ) )
68
68
if self .verbose :
69
69
print ("Loading {}" .format (new_filename ))
70
70
shutil .copy2 (self .library_path , new_filename )
@@ -110,7 +110,7 @@ def __del__(self):
110
110
if path .exists ():
111
111
if self .verbose :
112
112
print ("deleting" , str (path ))
113
- os . remove ( str ( path ) )
113
+ path . unlink ( )
114
114
115
115
116
116
# Setup up thread safe library manager.
You can’t perform that action at this time.
0 commit comments