mirror of
https://github.com/yzernik/squeaknode.git
synced 2026-08-16 13:01:04 +02:00
Remove unused db params module (#289)
This commit is contained in:
parent
4d5482af3b
commit
571bbe5bed
1 changed files with 0 additions and 16 deletions
|
|
@ -1,16 +0,0 @@
|
|||
valid_params = {"host", "database", "user", "password"}
|
||||
|
||||
|
||||
def parse_db_params(config, section="postgresql"):
|
||||
# get section, default to postgresql
|
||||
db = {}
|
||||
if config.has_section(section):
|
||||
params = config.items(section)
|
||||
for param in params:
|
||||
if param[0] in valid_params:
|
||||
db[param[0]] = param[1]
|
||||
else:
|
||||
raise Exception(
|
||||
"Section {0} not found in the {1} file".format(section, filename)
|
||||
)
|
||||
return db
|
||||
Loading…
Add table
Add a link
Reference in a new issue