From ea69727c6f78b4e1314babf4844f31c6e84f8e7d Mon Sep 17 00:00:00 2001 From: Faik Uygur Date: Fri, 27 Apr 2007 13:33:08 +0000 Subject: [PATCH] From-Import-Removal - not merged? --- pisi/lockeddbshelve.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pisi/lockeddbshelve.py b/pisi/lockeddbshelve.py index 67b073e4..cde9e5a9 100644 --- a/pisi/lockeddbshelve.py +++ b/pisi/lockeddbshelve.py @@ -24,7 +24,7 @@ _ = __trans.ugettext import pisi import pisi.context as ctx -from pisi.util import join_path +import pisi.util import pisi.version class Error(pisi.Error): @@ -34,7 +34,7 @@ class Error(pisi.Error): # if write is given it knows it has write access # if force is given it updates the specified db version def check_dbversion(versionfile, ver, write=False, update=False): - verfn = join_path(pisi.context.config.db_dir(), versionfile) + verfn = pisi.util.join_path(pisi.context.config.db_dir(), versionfile) firsttime = False if os.path.exists(verfn): verfile = file(verfn, 'r') @@ -63,7 +63,7 @@ def check_dbversion(versionfile, ver, write=False, update=False): raise Error(_('Database version %s not present.') % versionfile) def lock_dbenv(): - ctx.dbenv_lock = file(join_path(pisi.context.config.db_dir(), 'dbenv.lock'), 'w') + ctx.dbenv_lock = file(pisi.util.join_path(pisi.context.config.db_dir(), 'dbenv.lock'), 'w') try: fcntl.flock(ctx.dbenv_lock, fcntl.LOCK_EX | fcntl.LOCK_NB) except IOError: @@ -103,7 +103,7 @@ class LockedDBShelf(shelve.DBShelf): if dbenv == None: dbenv = ctx.dbenv shelve.DBShelf.__init__(self, dbenv) - filename = join_path(pisi.context.config.db_dir(), dbname + '.bdb') + filename = pisi.util.join_path(pisi.context.config.db_dir(), dbname + '.bdb') if dbenv and os.access(os.path.dirname(filename), os.W_OK): flags = 'w' elif os.access(filename, os.R_OK):