diff --git a/ippisite/ippidb/management/commands/update_mrc_files.py b/ippisite/ippidb/management/commands/update_mrc_files.py index 723b0a3184676c2c8ecf8090c43355012be21431..be8c4b759b60585642ce457f994dfd72ef68865c 100644 --- a/ippisite/ippidb/management/commands/update_mrc_files.py +++ b/ippisite/ippidb/management/commands/update_mrc_files.py @@ -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(