Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix 981. #982

Merged
merged 1 commit into from
Dec 11, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions aiida/work/persistence.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
import os.path as path
import portalocker
import portalocker.utils
from shutil import copyfile
import shutil
import tempfile
import pickle
from plum.persistence.bundle import Bundle
Expand Down Expand Up @@ -189,7 +189,7 @@ def load_all_processes(self):
LOGGER.warning("moving '{}' to failed directory".format(f))
try:
filename = os.path.basename(f)
os.rename(f, os.path.join(self.failed_directory, filename))
shutil.move(f, os.path.join(self.failed_directory, filename))
except OSError:
pass

Expand Down Expand Up @@ -362,7 +362,7 @@ def _release_process(self, pid, save_dir=None):
if save_dir is not None:
self._ensure_directory(save_dir)
to = path.join(save_dir, self.pickle_filename(pid))
copyfile(pickle_path, to)
shutil.copyfile(pickle_path, to)
os.remove(pickle_path)
else:
raise ValueError(
Expand Down