Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Don't use \"as\" in except.

  • Loading branch information...
commit e8422f944709a5f8c2c6a8c8a58a84a92620f035 1 parent 660cac3
Jens Diemer authored
Showing with 6 additions and 4 deletions.
  1. +3 −2 creole/setup_utils.py
  2. +3 −2 setup.py
5 creole/setup_utils.py
View
@@ -105,12 +105,13 @@ def get_long_description(package_root, filename="README.creole", raise_errors=No
long_description_rest = long_description_rest_unicode
else:
long_description_rest = long_description_rest_unicode.encode("utf-8")
- except Exception as err:
+ except Exception:
if raise_errors:
raise
# Don't raise the error e.g. in ./setup install process
+ evalue = sys.exc_info()[1]
long_description_rest = "[Error: %s]\n%s" % (
- err, long_description_origin
+ evalue, long_description_origin
)
else:
if raise_errors:
5 setup.py
View
@@ -27,8 +27,9 @@ def get_authors():
f = file(os.path.join(PACKAGE_ROOT, "AUTHORS"), "r")
authors = [l.strip(" *\r\n") for l in f if l.strip().startswith("*")]
f.close()
- except Exception as err:
- authors = "[Error: %s]" % err
+ except Exception:
+ evalue = sys.exc_info()[1]
+ authors = "[Error: %s]" % evalue
return authors
Please sign in to comment.
Something went wrong with that request. Please try again.