[yum-commits] Branch 'yum-3_2_X' - utils.py
skvidal at osuosl.org
skvidal at osuosl.org
Wed Sep 29 16:16:48 UTC 2010
utils.py | 5 +++++
1 file changed, 5 insertions(+)
New commits:
commit 34ce17736dcb40366b6bbf176cce27f8a0f92e4e
Author: Seth Vidal <skvidal at fedoraproject.org>
Date: Wed Sep 29 11:36:27 2010 -0400
if the pid we had back to show_lock_owner is empty or not an int
or what-have-you - then don't try and use it
diff --git a/utils.py b/utils.py
index aad1b73..837c9b6 100644
--- a/utils.py
+++ b/utils.py
@@ -58,6 +58,11 @@ def get_process_info(pid):
if not pid:
return
+ try:
+ pid = int(pid)
+ except ValueError, e:
+ return
+
# Maybe true if /proc isn't mounted, or not Linux ... or something.
if (not os.path.exists("/proc/%d/status" % pid) or
not os.path.exists("/proc/stat") or
More information about the Yum-commits
mailing list