Permalink
Browse files

catch errors in setup.py

  • Loading branch information...
1 parent 798727c commit 4cb38ff6913043724b2b33e6cdb14135e9a7c73e @jedie committed Sep 28, 2010
Showing with 13 additions and 6 deletions.
  1. +1 −0 .gitignore
  2. +12 −6 setup.py
View
@@ -1,2 +1,3 @@
django_tools.egg-info/*
+dist/*
*.pyc
View
@@ -27,16 +27,22 @@
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()
+ try:
+ 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, err:
+ authors = "[Error: %s]" % err
return authors
def get_long_description():
- f = file(os.path.join(PACKAGE_ROOT, "README.textile"), "r")
- long_description = f.read().strip()
- f.close()
+ try:
+ f = file(os.path.join(PACKAGE_ROOT, "README.textile"), "r")
+ long_description = f.read().strip()
+ f.close()
+ except Exception, err:
+ long_description = "[Error: %s]" % err
return long_description

0 comments on commit 4cb38ff

Please sign in to comment.