From 794da454e5cf253b25380e7b9a1bf525bdfea5ec Mon Sep 17 00:00:00 2001 From: Faik Uygur Date: Sat, 22 Jul 2006 14:13:54 +0000 Subject: [PATCH] * sen de git. --- pisi-cli | 5 +---- pisi/operations.py | 7 ------- scripts/pisish | 2 -- 3 files changed, 1 insertion(+), 13 deletions(-) diff --git a/pisi-cli b/pisi-cli index 5460427b..77034448 100755 --- a/pisi-cli +++ b/pisi-cli @@ -75,7 +75,4 @@ if __name__ == "__main__": locale.setlocale(locale.LC_ALL, '') cli = pisicli.PisiCLI() - try: - cli.run_command() - except pisi.operations.PisiUpgradeException, e: - print _('PISI has been upgraded.') + cli.run_command() diff --git a/pisi/operations.py b/pisi/operations.py index 8df62768..9547ad9e 100644 --- a/pisi/operations.py +++ b/pisi/operations.py @@ -38,12 +38,6 @@ from pisi.version import Version class Error(pisi.Error): pass -class PisiUpgradeException(pisi.Exception): - """application must reload all pisi modules it imported after receiving - this exception""" - def __init__(self): - pisi.Exception.__init__(self, _("Upgrading PISI requires database rebuild and restart")) - def upgrade_pisi(): """forces to reload pisi modules and runs rebuild-db if needed.""" @@ -74,7 +68,6 @@ def upgrade_pisi(): reload_pisi() rebuild_db() pisi.api.init() - raise PisiUpgradeException() # high level operations diff --git a/scripts/pisish b/scripts/pisish index 64c5dc2b..f55bc480 100755 --- a/scripts/pisish +++ b/scripts/pisish @@ -52,8 +52,6 @@ Copyright 2006 (c) Pardus. try: cli = PisiCLI(cmd.split()) cli.run_command() - except pisi.operations.PisiUpgradeException, e: - print _('PISI has been upgraded.') except Exception, value: signal.signal(signal.SIGINT, signal.SIG_IGN) # disable further interrupts ui = pisi.cli.CLI() # make a temporary UI