Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
# Disable repositories
for name in args.disable_repo:
repo = p.get_repo(name)
+ if not repo:
+ print(_("Could not find repository '%s' to disable it") % name,
+ file=sys.stderr)
+ continue
+
+ # Disable repository
repo.enabled = False
# Enable repositories
for name in args.enable_repo:
repo = p.get_repo(name)
+ if not repo:
+ print(_("Could not find repository '%s' to enable it") % name,
+ file=sys.stderr)
+ continue
+
+ # Enable repository
repo.enabled = True
# Call function