parser.add_argument("--root", metavar="PATH", default="/",
help=_("The path where pakfire should operate in"))
+ # Yes?
+ parser.add_argument("-y", action="store_true", dest="yes",
+ help=_("Do not prompt for any questions"))
+
subparsers = parser.add_subparsers()
# check
debug=args.debug,
)
+ # Create a new confirm callback
+ def confirm_callback(message, question):
+ if args.yes:
+ return True
+
+ return self._confirm_callback(message, question)
+
# Create Pakfire instance
p = pakfire.Pakfire(
conf=args.config,
logger=logger.log,
# Callbacks
- confirm_callback=self._confirm_callback,
+ confirm_callback=confirm_callback,
)
# Disable repositories