diff options
author | Aaron LI <aaronly.me@outlook.com> | 2017-02-06 11:50:34 +0800 |
---|---|---|
committer | Aaron LI <aaronly.me@outlook.com> | 2017-02-06 11:50:34 +0800 |
commit | 100c271015c52c5a7c8126f02f0b7e1a4ee483d8 (patch) | |
tree | c67425cedb8f6e1ec8af0ea65f6bcc988ecc9b98 /scripts | |
parent | fcfede96ee8789fe39bf9c97c707466caa62214a (diff) | |
download | chandra-acis-analysis-100c271015c52c5a7c8126f02f0b7e1a4ee483d8.tar.bz2 |
setup_pfiles.py: Handle the SameFileError when copy pfiles
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/setup_pfiles.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/scripts/setup_pfiles.py b/scripts/setup_pfiles.py index d927005..8a80a14 100644 --- a/scripts/setup_pfiles.py +++ b/scripts/setup_pfiles.py @@ -30,6 +30,9 @@ def setup_pfiles(tools): "paccess", tool ]).decode("utf-8").strip() subprocess.check_call(["punlearn", tool]) - shutil.copy(pfile, ".") + try: + shutil.copy(pfile, ".") + except shutil.SameFileError: + pass # Setup the ``PFILES`` environment variable os.environ["PFILES"] = "./:" + os.environ["PFILES"] |