aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorAaron LI <aaronly.me@outlook.com>2017-02-13 23:49:53 +0800
committerAaron LI <aaronly.me@outlook.com>2017-02-17 01:16:45 +0800
commite8f76d0fb4e5cc99d1c9c88754d29d17ccb7ef6e (patch)
treef893eaf2e3b85e00f9f7207e2ddd9e55add379ab /scripts
parent499deec0d6e28f4e842f6072de000bae236ac1e4 (diff)
downloadchandra-acis-analysis-e8f76d0fb4e5cc99d1c9c88754d29d17ccb7ef6e.tar.bz2
analyze_path.py: Use absolute path
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/analyze_path.py5
1 files 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__":