improve job class selection code

+ consistent argument order for add_argument() calls
This commit is contained in:
Mike Fährmann
2019-05-10 22:05:57 +02:00
parent e64773ffdd
commit bd9cb3d191
2 changed files with 65 additions and 63 deletions

View File

@@ -204,14 +204,8 @@ def main():
if args.list_urls:
jobtype = job.UrlJob
jobtype.maxdepth = args.list_urls
elif args.list_keywords:
jobtype = job.KeywordJob
elif args.list_data:
jobtype = job.DataJob
elif args.simulate:
jobtype = job.SimulationJob
else:
jobtype = job.DownloadJob
jobtype = args.jobtype or job.DownloadJob
urls = args.urls
if args.inputfile: