From e4eeb65410346b834bf44bc13a12bd63dffc6187 2012-07-21 15:05:28 From: MinRK Date: 2012-07-21 15:05:28 Subject: [PATCH] Backport PR #2061: use explicit tuple in exception fixes #2056 Do we want to try enforcing [pep 3110](http://www.python.org/dev/peps/pep-3110/) and use `as` in every exceptions that uses `,` ? --- diff --git a/IPython/core/magics/osm.py b/IPython/core/magics/osm.py index f761513..d26b533 100644 --- a/IPython/core/magics/osm.py +++ b/IPython/core/magics/osm.py @@ -684,7 +684,7 @@ class OSMagics(Magics): try : cont = self.shell.find_user_code(parameter_s) - except ValueError, IOError: + except (ValueError, IOError): print "Error: no such file, variable, URL, history range or macro" return