Skip to content

Commit

Permalink
Removing silent overwrite of shutil.copy (#2081)
Browse files Browse the repository at this point in the history
  • Loading branch information
opotowsky authored Feb 10, 2025
1 parent dd8effe commit 1d05fb6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
7 changes: 1 addition & 6 deletions armi/utils/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -800,7 +800,7 @@ def merge(self, *otherDictionaries) -> None:


def safeCopy(src: str, dst: str) -> None:
"""This copy overwrites ``shutil.copy`` and checks that copy operation is truly completed before continuing."""
"""Check that copy operation is truly completed before continuing."""
# Convert files to OS-independence
src = os.path.abspath(src)
dst = os.path.abspath(dst)
Expand Down Expand Up @@ -882,8 +882,3 @@ def safeMove(src: str, dst: str) -> None:

runLog.extra("Moved {} -> {}".format(src, dst))
return dst


# Allow us to check the copy operation is complete before continuing
shutil_copy = shutil.copy
shutil.copy = safeCopy
1 change: 1 addition & 0 deletions doc/release/0.5.rst
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ Quality Work
#. Significant revamp of the ARMI requirements. (`PR#2074 <https://github.com/terrapower/armi/pull/2074>`_)
#. Adding PDF versions of the ARMI docs. (`PR#2072 <https://github.com/terrapower/armi/pull/2072>`_)
#. Update docs build to occur with python 3.13 and updated docs dependencies. (`PR#2050 <https://github.com/terrapower/armi/pull/2050>`_)
#. Removing silent overwrite of ``shutil.copy``. (`PR#2081 <https://github.com/terrapower/armi/pull/2081>`_)
#. TBD


Expand Down

0 comments on commit 1d05fb6

Please sign in to comment.