Be consistent, always use ctx. ctx will die too. soon.
This commit is contained in:
+6
-2
@@ -134,8 +134,12 @@ def finalize():
|
||||
ctx.loghandler.flush()
|
||||
ctx.log.removeHandler(ctx.loghandler)
|
||||
|
||||
pisi.db.repodb.finalize()
|
||||
pisi.db.installdb.finalize()
|
||||
if ctx.repodb:
|
||||
ctx.repodb.finalize()
|
||||
ctx.repodb = None
|
||||
if ctx.installdb:
|
||||
ctx.installdb.finalize()
|
||||
ctx.installdb = None
|
||||
if ctx.filesdb != None:
|
||||
ctx.filesdb.close()
|
||||
ctx.filesdb = None
|
||||
|
||||
@@ -525,7 +525,7 @@ class Remove(AtomicOperation):
|
||||
def remove_db(self, txn):
|
||||
ctx.installdb.remove(self.package_name, txn)
|
||||
ctx.filesdb.remove_files(self.files, txn)
|
||||
pisi.db.packagedb.remove_tracking_package(self.package_name, txn)
|
||||
ctx.packagedb.remove_tracking_package(self.package_name, txn)
|
||||
|
||||
|
||||
def remove_single(package_name):
|
||||
|
||||
+1
-1
@@ -17,7 +17,7 @@ __trans = gettext.translation('pisi', fallback=True)
|
||||
_ = __trans.ugettext
|
||||
|
||||
import pisi.context as ctx
|
||||
#import pisi.db.packagedb as packagedb
|
||||
import pisi.db.packagedb as packagedb
|
||||
from pisi.version import Version
|
||||
import pisi.pxml.autoxml as autoxml
|
||||
import pisi.db.itembyrepodb
|
||||
|
||||
Reference in New Issue
Block a user