diff options
author | Aaron LI <aaronly.me@outlook.com> | 2017-02-26 18:54:47 +0800 |
---|---|---|
committer | Aaron LI <aaronly.me@outlook.com> | 2017-02-26 18:54:47 +0800 |
commit | 506bbdc6da6c0b7ab52ba9c5564261c2ef449f70 (patch) | |
tree | b231daa9a4727911333cbb61e612f7c7b5c4249f | |
parent | 9cff4d5c604fc81cb0f6b65f9b2b39cdd8b8986f (diff) | |
download | chandra-acis-analysis-506bbdc6da6c0b7ab52ba9c5564261c2ef449f70.tar.bz2 |
acispy/manifest.py: Fix 'setpath()' method when give a list
-rw-r--r-- | acispy/manifest.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/acispy/manifest.py b/acispy/manifest.py index 03320f8..198d47e 100644 --- a/acispy/manifest.py +++ b/acispy/manifest.py @@ -153,6 +153,8 @@ class Manifest: if isinstance(path, list): abspath = [os.path.abspath(p) for p in path] relpath = [os.path.relpath(p, start=dirname) for p in abspath] + if len(relpath) == 1: + relpath = relpath[0] else: abspath = os.path.abspath(path) relpath = os.path.relpath(abspath, start=dirname) |