Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

ps_mem.py: fix exception syntax for python 3

* scripts/ps_mem.py: Adjust exception inspection to
be compatible with both python 2.4 and 3
Reported at #3
  • Loading branch information...
commit 9241271bab49a3e6a115d916376993d7848a5024 1 parent ed0e546
@pixelb authored
Showing with 3 additions and 2 deletions.
  1. +3 −2 scripts/ps_mem.py
View
5 scripts/ps_mem.py
@@ -35,7 +35,7 @@
# Patch from patrice.bouchand.fedora@gmail.com
# V1.9 20 Feb 2008 Fix invalid values reported when PSS is available.
# Reported by Andrey Borzenkov <arvidjaar@mail.ru>
-# V2.5 08 Aug 2011
+# V2.6 13 Aug 2011
# http://github.com/pixelb/scripts/commits/master/scripts/ps_mem.py
# Notes:
@@ -130,7 +130,8 @@ def kernel_ver():
try:
kv=kernel_ver()
-except (IOError, OSError), value:
+except (IOError, OSError):
+ value = sys.exc_info()[1]
if value.errno == errno.ENOENT:
sys.stderr.write(
"Couldn't access /proc\n"
Please sign in to comment.
Something went wrong with that request. Please try again.