Skip to content

Commit

Permalink
Check work dir exists
Browse files Browse the repository at this point in the history
  • Loading branch information
zmoon committed Sep 27, 2024
1 parent 30ea3d7 commit ed4d03e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions utils/python/nexus_nei2019_linker.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,10 @@ def link_file(src_file, tgt_file):
work_dir = args.work_dir.rstrip("/")
version = args.nei_version

if not os.path.isdir(work_dir):
print(f"error: work dir setting {work_dir!r} does not exist or is not a directory")
raise SystemExit(2)

if args.read_hemco_time:
if args.time_file_path is None:
hemco_time_file = os.path.join(args.work_dir, "../HEMCO_sa_Time.rc")
Expand All @@ -154,6 +158,7 @@ def link_file(src_file, tgt_file):
raise SystemExit(1)

print("src dir:", src_dir)
print("work dir:", work_dir)
for d in dates:
mo = d.month
iwd = d.isoweekday()
Expand Down

0 comments on commit ed4d03e

Please sign in to comment.