Skip to content

Commit 0b68105

Browse files
util: fix bare exit no-op in correlateRC.py
exit without parentheses is a no-op in Python; replace with exit(1) so invalid res_unit/cap_unit arguments terminate the script immediately instead of continuing with undefined res_scale/cap_scale variables. Signed-off-by: Ashnaa Seth <ashnaaseth2325@gmail.com> Signed-off-by: ashnaaseth2325-oss <ashnaaseth2325@gmail.com>
1 parent 7b9c592 commit 0b68105

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

flow/util/correlateRC.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ def parse_args():
7373
res_scale = 1e3
7474
else:
7575
print("unknown resistance unit")
76-
exit
76+
exit(1)
7777

7878
cap_unit = args.cap_unit
7979
if cap_unit == "ff":
@@ -82,7 +82,7 @@ def parse_args():
8282
cap_scale = 1e-12
8383
else:
8484
print("unknown capacitance unit")
85-
exit
85+
exit(1)
8686

8787

8888
def makeDict():

0 commit comments

Comments
 (0)