Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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
Pádraig Brady authored

Showing 1 changed file with 3 additions and 2 deletions. Show diff stats Hide diff stats

  1. +3 2 scripts/ps_mem.py
5 scripts/ps_mem.py
@@ -35,7 +35,7 @@
35 35 # Patch from patrice.bouchand.fedora@gmail.com
36 36 # V1.9 20 Feb 2008 Fix invalid values reported when PSS is available.
37 37 # Reported by Andrey Borzenkov <arvidjaar@mail.ru>
38   -# V2.5 08 Aug 2011
  38 +# V2.6 13 Aug 2011
39 39 # http://github.com/pixelb/scripts/commits/master/scripts/ps_mem.py
40 40
41 41 # Notes:
@@ -130,7 +130,8 @@ def kernel_ver():
130 130
131 131 try:
132 132 kv=kernel_ver()
133   -except (IOError, OSError), value:
  133 +except (IOError, OSError):
  134 + value = sys.exc_info()[1]
134 135 if value.errno == errno.ENOENT:
135 136 sys.stderr.write(
136 137 "Couldn't access /proc\n"

0 comments on commit 9241271

Please sign in to comment.
Something went wrong with that request. Please try again.