10
0
mirror of https://github.com/LCPQ/QUESTDB_website.git synced 2024-12-25 05:43:46 +01:00

Print help message when no file or list arguments

This commit is contained in:
Mickaël Véril 2020-07-03 14:52:59 +02:00
parent d1e1b10285
commit 109ab8b0c5

View File

@ -19,7 +19,7 @@ if args.list:
print("The list of avalable formats are:") print("The list of avalable formats are:")
for formatName,_ in getFormatHandlers(): for formatName,_ in getFormatHandlers():
print(formatName) print(formatName)
else: elif args.file!=None:
lines=args.file.readlines() lines=args.file.readlines()
soup=TexSoup(lines) soup=TexSoup(lines)
opt=soup.dfbOptions opt=soup.dfbOptions
@ -38,3 +38,5 @@ else:
datalst=dataFileBase.readFromTable(dat,texOps,commands=commands) datalst=dataFileBase.readFromTable(dat,texOps,commands=commands)
for data in datalst: for data in datalst:
data.toFile(datapath,texOps.suffix) data.toFile(datapath,texOps.suffix)
else:
parser.print_help()