From 506bbdc6da6c0b7ab52ba9c5564261c2ef449f70 Mon Sep 17 00:00:00 2001 From: Aaron LI Date: Sun, 26 Feb 2017 18:54:47 +0800 Subject: acispy/manifest.py: Fix 'setpath()' method when give a list --- acispy/manifest.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'acispy') 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) -- cgit v1.2.2