comparison roundup_cc.py @ 26:761ee2351f58

Change the parameter read in. * The structure was changed and better names used.
author Magnus Schieder <mschieder@intevation.de>
date Tue, 13 Nov 2018 17:55:10 +0100
parents 7161ce4e7ab1
children e2864dabdb8c
comparison
equal deleted inserted replaced
25:7161ce4e7ab1 26:761ee2351f58
37 37
38 keywords = config.get("SEARCH", "Keywords", fallback="").split(", ") 38 keywords = config.get("SEARCH", "Keywords", fallback="").split(", ")
39 39
40 search = config.get("SEARCH", "Search", fallback="prio") 40 search = config.get("SEARCH", "Search", fallback="prio")
41 if search == "prio": 41 if search == "prio":
42 list_of_columns = config.get("SEARCH", "Columns", fallback=PRIO).split(", ") 42 list_of_columns = config.get("SEARCH", "Priority", fallback=PRIO).split(", ")
43 status = config.get("SEARCH", "Status", fallback="").split(", ") 43 status = config.get("SEARCH", "Status", fallback="").split(", ")
44 include_no_prio = config.getboolean("SEARCH", "IncludeNoPrio", fallback= False) 44 include_no_prio = config.getboolean("SEARCH", "IncludeNoPrio", fallback= False)
45 if include_no_prio: 45 if include_no_prio:
46 list_of_columns += ["None"] 46 list_of_columns += ["None"]
47 47
48 elif search == "status": 48 elif search == "status":
49 list_of_columns = config.get("SEARCH", "Status", fallback=STATES).split(", ") 49 list_of_columns = config.get("SEARCH", "Status", fallback=STATES).split(", ")
50 status = [""] 50 status = [""]
51 51
52 else:
53 print("Incorrect [SEARCH]Search parameter. (prio, status)")
54 return
55
52 select_all, select_where, create_db, insert_new = \ 56 select_all, select_where, create_db, insert_new = \
53 rcd.build_sql_commands(list_of_columns) 57 rcd.build_sql_commands(list_of_columns)
54 58
55 save_stats_in_db(search, login_parameters, base_url, database_file, 59 save_stats_in_db(search, login_parameters, base_url, database_file,
56 list_of_columns, create_db, insert_new, keywords, status) 60 list_of_columns, create_db, insert_new, keywords, status)
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)