Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions PNV-Batch-Number-Lookup-Tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
if len(sys.argv) != 4:
print("\n---Error in argument list")
print("\n---Usage $python PNV-Batch-number-Lookup-Tool.py <INPUT FILE NAME> <Feature Set> <File Retention in Days>")
print("\n---Valid values for feature set: fs1, fs2, fs3 or fs23")
print("\n---Valid values for feature set: fs1, fs2, fs3, fs5 or fs23")
print("\n---File Retention Days should be 1 to 7 only")
print("\n---Example: $python PNV-Batch-number-Lookup-Tool.py phonenumbers.txt fs1 1")
sys.exit()
Expand All @@ -42,7 +42,7 @@

#Validating the command line arguments
#command line argument validation for Inputfilename, feature set and file expiry
#allowed values are input file with .txt extention, feature set allowed are fs1, fs2, fs3 or fs23
#allowed values are input file with .txt extention, feature set allowed are fs1, fs2, fs3, fs5 or fs23
#allwed values for file expiry are between 1 and 7

if len(sys.argv) == 4:
Expand All @@ -53,16 +53,16 @@
print("\n---Input File:", input_file_name)

'''
if (not fs == "fs1" or fs == "fs2" or fs == "fs3" or fs == "fs23"):
print("\n---ERROR: Feature_set not provided or Invalid, allowed values are fs1, fs2, fs3 or fs23 only")
if (not fs == "fs1" or fs == "fs2" or fs == "fs3" or fs == "fs5" or fs == "fs23"):
print("\n---ERROR: Feature_set not provided or Invalid, allowed values are fs1, fs2, fs3, fs5 or fs23 only")
sys.exit()
else:
print("\n---Feature set entered is :",fs)
'''
if (fs == "fs1" or fs == "fs2" or fs == "fs3" or fs == "fs23"):
if (fs == "fs1" or fs == "fs2" or fs == "fs3" or fs == "fs5" or fs == "fs23"):
print("\n---Feature set entered is :",fs)
else:
print("\n---ERROR: Feature_set not provided or Invalid, allowed values are fs1, fs2, fs3 or fs23 only")
print("\n---ERROR: Feature_set not provided or Invalid, allowed values are fs1, fs2, fs3, fs5 or fs23 only")
sys.exit()

if (file_expiry < 1 or file_expiry > 7 ):
Expand Down Expand Up @@ -345,4 +345,4 @@
print ("\n---Retry File Location: ", retry_file)

print("\n###Job Completed###")
## End
## End