Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit e8d959b

Browse files
committedAug 21, 2018
More refactor file manipulations to use pathlib
1 parent 6d90fe5 commit e8d959b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed
 

‎src/axelrod_fortran/shared_library_manager.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ def create_library_copy(self):
6464
self.prefix,
6565
str(copy_number),
6666
self.shared_library_name)
67-
new_filename = str(Path(temp_directory) / filename)
67+
new_filename = str(Path(temp_directory, filename))
6868
if self.verbose:
6969
print("Loading {}".format(new_filename))
7070
shutil.copy2(self.library_path, new_filename)
@@ -110,7 +110,7 @@ def __del__(self):
110110
if path.exists():
111111
if self.verbose:
112112
print("deleting", str(path))
113-
os.remove(str(path))
113+
path.unlink()
114114

115115

116116
# Setup up thread safe library manager.

0 commit comments

Comments
 (0)
Please sign in to comment.