Skip to content

Commit

Permalink
remove unused argument, fix pylint warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
abbbi committed Jan 25, 2024
1 parent 4943e8f commit 45aabd9
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions qmprebase
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,6 @@ from libqmpbackup import version
from libqmpbackup.lib import QmpBackup

parser = argparse.ArgumentParser(prog=sys.argv[0])
parser.add_argument(
"--debug", dest="debug", help="activate debug log", action="store_true", required=0
)
subparsers = parser.add_subparsers(help="sub-command help")
parser_rebase = subparsers.add_parser("rebase", help="rebase")
parser_rebase.set_defaults(which="rebase")
Expand All @@ -41,17 +38,16 @@ parser_rebase.add_argument(
argv = parser.parse_args()
try:
action = argv.which
except Exception:
except AttributeError:
parser.print_help()
sys.exit(1)

common = QmpBackup(argv.debug)
common = QmpBackup(False)
log = common.setup_log()

log.info("Version: %s Arguments: %s", version.VERSION, " ".join(sys.argv))

if action == "rebase":
"""Rebase images in directory"""
if common.rebase(argv.dir, argv.dry_run, argv.until):
log.info("Image files rollback successful.")
sys.exit(0)
Expand Down

0 comments on commit 45aabd9

Please sign in to comment.