Commit 81f61ddf authored by Fabien  MAREUIL's avatar Fabien MAREUIL
Browse files

add commandError

parent 50290b7e
Pipeline #50413 failed with stages
in 16 minutes and 45 seconds
......@@ -23,9 +23,9 @@ def isolevel_float(arg):
try:
f = float(arg)
except ValueError:
raise argparse.ArgumentTypeError("Must be a floating point number")
raise CommandError("Must be a floating point number")
if f < 0 or f > 1.0:
raise argparse.ArgumentTypeError("Argument must be < 1.0 and > 0")
raise CommandError("Argument must be < 1.0 and > 0")
return f
......@@ -147,7 +147,7 @@ class Command(AppCommand):
with open(data, "rb") as f:
interactfile.interact_file.delete()
interactfile.interact_file.save(os.path.basename(data), File(f))
interactfile.default_isolevel=options["default_isolevel"]
interactfile.default_isolevel = options["default_isolevel"]
interactfile.save()
self.stdout.write(
self.style.SUCCESS(
......
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