aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAaron LI <aaronly.me@outlook.com>2017-02-14 10:20:58 +0800
committerAaron LI <aaronly.me@outlook.com>2017-02-17 01:16:45 +0800
commitaa3faf710dd91d6bead968028f49fa45ce8f51f0 (patch)
tree49a2abf9b53524f82622675016c06b335ee29407
parentbe842619460a981cf2eb2bd779bb692c1da48390 (diff)
downloadchandra-acis-analysis-aa3faf710dd91d6bead968028f49fa45ce8f51f0.tar.bz2
manifest.py: Only change directory when need to find manifest file
-rwxr-xr-xscripts/manifest.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/scripts/manifest.py b/scripts/manifest.py
index a736903..844a919 100755
--- a/scripts/manifest.py
+++ b/scripts/manifest.py
@@ -316,12 +316,11 @@ def main(description="Manage the observation manifest (YAML format)",
#
args = parser.parse_args()
- if args.directory:
- os.chdir(args.directory)
-
if os.path.exists(args.file):
manifest_file = args.file
else:
+ if args.directory:
+ os.chdir(args.directory)
manifest_file = find_manifest(args.file)
manifest = Manifest(manifest_file)