[yum-commits] Branch 'yum-3_2_X' - 2 commits - yum/__init__.py
skvidal at osuosl.org
skvidal at osuosl.org
Thu Jul 22 17:32:54 UTC 2010
yum/__init__.py | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
New commits:
commit 8dce195608b0b6b2a65068a37fb029959006c1a9
Merge: 87f1288... 731dbbb...
Author: Seth Vidal <skvidal at fedoraproject.org>
Date: Thu Jul 22 13:32:49 2010 -0400
Merge branch 'yum-3_2_X' of ssh://yum.baseurl.org/srv/projects/yum/git/yum into yum-3_2_X
* 'yum-3_2_X' of ssh://yum.baseurl.org/srv/projects/yum/git/yum:
Act on --releasever for all utils.py users
commit 87f1288ae093b26eeee5dda7cb2ac256679a201f
Author: Seth Vidal <skvidal at fedoraproject.org>
Date: Thu Jul 22 10:54:30 2010 -0400
if we lock and selinux (or something) keeps us from even accessing the lockfile/dir we shouldn't trace back
but generate a nice-ish lock error.
https://bugzilla.redhat.com/show_bug.cgi?id=617170
diff --git a/yum/__init__.py b/yum/__init__.py
index 0b3f627..6ca40ee 100644
--- a/yum/__init__.py
+++ b/yum/__init__.py
@@ -1580,7 +1580,12 @@ class YumBase(depsolve.Depsolve):
mypid=str(os.getpid())
while not self._lock(lockfile, mypid, 0644):
- fd = open(lockfile, 'r')
+ try:
+ fd = open(lockfile, 'r')
+ except (IOError, OSError), e:
+ msg = _("Could not open lock %s: %s") % (lockfile, e)
+ raise Errors.LockError(1, msg)
+
try: oldpid = int(fd.readline())
except ValueError:
# bogus data in the pid file. Throw away.
More information about the Yum-commits
mailing list