* sen de git.
This commit is contained in:
@@ -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()
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user