Commit 4dfd8e48 authored by Romain Courteaud's avatar Romain Courteaud

Fix sqlite default value

parent cdb3fbb9
...@@ -12,9 +12,7 @@ def runUrlChecker(): ...@@ -12,9 +12,7 @@ def runUrlChecker():
@click.option( @click.option(
"--sqlite", "--sqlite",
"-s", "-s",
help="The path of the sqlite DB.", help="The path of the sqlite DB. (default: :memory:)"
default=":memory:",
show_default=True,
) )
@click.option("--dns", "-d", help="The IP of the DNS server.") @click.option("--dns", "-d", help="The IP of the DNS server.")
@click.option("--url", "-u", help="The url to check.") @click.option("--url", "-u", help="The url to check.")
......
...@@ -25,9 +25,8 @@ def createConfiguration( ...@@ -25,9 +25,8 @@ def createConfiguration(
config.read_dict({CONFIG_SECTION: mapping}) config.read_dict({CONFIG_SECTION: mapping})
# Required values # Required values
for parameter in ["SQLITE"]: if "SQLITE" not in config[CONFIG_SECTION]:
if parameter not in config[CONFIG_SECTION]: config[CONFIG_SECTION]["SQLITE"] = ":memory:"
raise AttributeError("Config %s not defined" % parameter)
return config[CONFIG_SECTION] return config[CONFIG_SECTION]
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment