diff --git a/docs/release-notes.rst b/docs/release-notes.rst index 2843ac9..85b4032 100644 --- a/docs/release-notes.rst +++ b/docs/release-notes.rst @@ -26,6 +26,7 @@ Improvements - DSO Driver function 'waveform_values' now returns a single channels x and y data as two separate lists, without re-acquiring the signal. This function should now be called after performing signal acquisition. - Invert channel and vtime funcitons implemented in the DSO driver. +- Fxconfig fixes for cmd2 4.0.0 ************* Version 0.6.4 diff --git a/src/fixate/core/config_util.py b/src/fixate/core/config_util.py index 6e6f481..ea7b85d 100644 --- a/src/fixate/core/config_util.py +++ b/src/fixate/core/config_util.py @@ -1,5 +1,4 @@ import cmd2 -import argparse import pyvisa import json import copy @@ -36,13 +35,13 @@ choices = ["existing", "updated", "visa"] # create the top-level parser for the base command -list_parser = argparse.ArgumentParser(prog="list") +list_parser = cmd2.Cmd2ArgumentParser(prog="list") list_parser.add_argument("type", choices=choices) -test_parser = argparse.ArgumentParser(prog="test") +test_parser = cmd2.Cmd2ArgumentParser(prog="test") test_parser.add_argument("type", choices=choices) -add_parser = argparse.ArgumentParser(prog="add") +add_parser = cmd2.Cmd2ArgumentParser(prog="add") add_subparsers = add_parser.add_subparsers(title="add command") add_visa_parser = add_subparsers.add_parser("visa") @@ -215,7 +214,7 @@ def do_save(self, line=None): ) except Exception as e: self.perror(e) - if backup_file: + if backup_path: backup_path.replace(config_file_path) raise