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
32 changes: 9 additions & 23 deletions sd_file_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,7 @@
# Implementation
#----------------
#
import inspect
import numpy
import os

Expand Down Expand Up @@ -1436,38 +1437,23 @@ def validCommandLineArgument( arg ):
if not (len(out) == 2):
#
print('ERROR: Unknown commandline argument: ' + arg)
sys.exit()
sys.exit(1)
#
key,val = out

if key.lower() in ['path']:
#
key = 'path'
#
elif key.lower() in ['outputfiletype']:
#
key = 'outputFileType'
#
elif key.lower() in ['spectra']:
#
key = 'spectra'
#
elif key.lower() in ['lffilter']:
#
key = 'lfFilter'
#
elif key.lower() in ['bulkparameters']:
#
key = 'bulkParameters'
#
# normalize arg names to the capitalization required by main()
argnames = list(inspect.signature(main).parameters)
for argname in argnames:
if key.lower() == argname.lower():
key = argname
break
else:
#
print('ERROR: unknown commandline argument ' + key)
sys.exit()
sys.exit(1)
#
return( key,val)
#

def getVersions( path ):
"""
This function retrieves sha from sys filenames; if no sha is present
Expand Down