From aa3faf710dd91d6bead968028f49fa45ce8f51f0 Mon Sep 17 00:00:00 2001 From: Aaron LI Date: Tue, 14 Feb 2017 10:20:58 +0800 Subject: manifest.py: Only change directory when need to find manifest file --- scripts/manifest.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'scripts') 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) -- cgit v1.2.2