From e8f76d0fb4e5cc99d1c9c88754d29d17ccb7ef6e Mon Sep 17 00:00:00 2001 From: Aaron LI Date: Mon, 13 Feb 2017 23:49:53 +0800 Subject: analyze_path.py: Use absolute path --- scripts/analyze_path.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/analyze_path.py b/scripts/analyze_path.py index 06cfcab..dc33dcd 100755 --- a/scripts/analyze_path.py +++ b/scripts/analyze_path.py @@ -68,6 +68,7 @@ def main(): help="Path to the data directory " + "(default: current working directory)") args = parser.parse_args() + path = os.path.abspath(args.path) b_get_name = False if args.obsid else True b_get_obsid = False if args.name else True @@ -75,11 +76,11 @@ def main(): if b_get_name: if not args.brief: print("Name:", end=" ") - print(get_name(args.path)) + print(get_name(path)) if b_get_obsid: if not args.brief: print("ObsID:", end=" ") - print(get_obsid(args.path)) + print(get_obsid(path)) if __name__ == "__main__": -- cgit v1.2.2