def main(args): try: with dnf.cli.cli.BaseCli() as base: return _main(base, args) except dnf.exceptions.ProcessLockError as e: logger.critical(e.value) show_lock_owner(e.pid) return 1 except dnf.exceptions.LockError as e: logger.critical(e.value) return 1 except dnf.exceptions.DepsolveError as e: ex_Error(e) logger.info( _("(try to add '--allowerasing' to command line to " "replace conflicting packages)")) return 1 except dnf.exceptions.Error as e: return ex_Error(e) except IOError as e: return ex_IOError(e) except KeyboardInterrupt as e: print(_("Terminated."), file=sys.stderr) return 1 return 0
def main(args, conf_class=Conf, cli_class=Cli, option_parser_class=OptionParser): try: dnf.i18n.setup_stdout() with dnf.cli.cli.BaseCli(conf_class()) as base: return _main(base, args, cli_class, option_parser_class) except dnf.exceptions.ProcessLockError as e: logger.critical(e.value) show_lock_owner(e.pid) return 200 except dnf.exceptions.LockError as e: logger.critical(e.value) return 200 except dnf.exceptions.DepsolveError as e: return 1 except dnf.exceptions.Error as e: return ex_Error(e) except hawkey.Exception as e: logger.critical(_('Error: %s'), ucd(e)) return 1 except libdnf.error.Error as e: logger.critical(_('Error: %s'), ucd(e)) return 1 except IOError as e: return ex_IOError(e) except KeyboardInterrupt as e: logger.critical('{}: {}'.format(type(e).__name__, _("Terminated."))) return 1
def main(args): with dnf.cli.cli.BaseCli() as base: try: return _main(base, args) except dnf.exceptions.ProcessLockError as e: logger.critical(e.value) show_lock_owner(e.pid, logger) return 1 except dnf.exceptions.LockError as e: logger.critical(e.value) return 1 except KeyboardInterrupt as e: print(_("Terminated."), file=sys.stderr) return 1 return 0
def main(args): try: with dnf.cli.cli.BaseCli() as base: return _main(base, args) except dnf.exceptions.ProcessLockError as e: logger.critical(e.value) show_lock_owner(e.pid, logger) return 1 except dnf.exceptions.LockError as e: logger.critical(e.value) return 1 except IOError as e: return ex_IOError(e) except KeyboardInterrupt as e: print(_("Terminated."), file=sys.stderr) return 1 return 0
def main(args): try: with dnf.cli.cli.BaseCli(YumConf()) as base: return _main(base, args) except dnf.exceptions.ProcessLockError as e: logger.critical(e.value) show_lock_owner(e.pid) return 1 except dnf.exceptions.LockError as e: logger.critical(e.value) return 1 except dnf.exceptions.DepsolveError as e: return 1 except dnf.exceptions.Error as e: return dnf.cli.main.ex_Error(e) except IOError as e: return dnf.cli.main.ex_IOError(e) except KeyboardInterrupt as e: logger.critical('{}: {}'.format(type(e).__name__, "Terminated.")) return 1
def main(args, conf_class=Conf, cli_class=Cli, option_parser_class=OptionParser): try: with dnf.cli.cli.BaseCli(conf_class()) as base: return _main(base, args, cli_class, option_parser_class) except dnf.exceptions.ProcessLockError as e: logger.critical(e.value) show_lock_owner(e.pid) return 200 except dnf.exceptions.LockError as e: logger.critical(e.value) return 200 except dnf.exceptions.DepsolveError as e: return 1 except dnf.exceptions.Error as e: return ex_Error(e) except IOError as e: return ex_IOError(e) except KeyboardInterrupt as e: logger.critical('{}: {}'.format(type(e).__name__, "Terminated.")) return 1
def main(args): try: with dnf.cli.cli.BaseCli() as base: return _main(base, args) except dnf.exceptions.ProcessLockError as e: logger.critical(e.value) show_lock_owner(e.pid) return 1 except dnf.exceptions.LockError as e: logger.critical(e.value) return 1 except dnf.exceptions.DepsolveError as e: ex_Error(e) logger.info(_("(try to add '--allowerasing' to command line to " "replace conflicting packages)")) return 1 except dnf.exceptions.Error as e: return ex_Error(e) except IOError as e: return ex_IOError(e) except KeyboardInterrupt as e: print(_("Terminated."), file=sys.stderr) return 1 return 0