- don't produce false error strings...
This commit is contained in:
+4
-4
@@ -40,10 +40,10 @@ class PackageDB(object):
|
|||||||
self.lockfile = file(self.fname + '.lock', 'w')
|
self.lockfile = file(self.fname + '.lock', 'w')
|
||||||
try:
|
try:
|
||||||
fcntl.flock(self.lockfile, fcntl.LOCK_EX | fcntl.LOCK_NB)
|
fcntl.flock(self.lockfile, fcntl.LOCK_EX | fcntl.LOCK_NB)
|
||||||
except IOError:
|
except IOError, e:
|
||||||
import sys
|
import sys
|
||||||
ctx.ui.error("Another instance of PISI is running. Try later!\n")
|
ctx.ui.error("PackageDB: %s\n" % e)
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
self.d = shelve.open(self.fname)
|
self.d = shelve.open(self.fname)
|
||||||
self.dr = shelve.open(self.fname2)
|
self.dr = shelve.open(self.fname2)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user