| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -9,6 +9,7 @@ | |||
| 9 | 9 | from distutils.command.build_py import build_py as _build_py | |
| 10 | 10 | from setuptools.command.sdist import sdist as _sdist | |
| 11 | 11 | import os | |
| 12 | + import sys | ||
| 12 | 13 | from os import path | |
| 13 | 14 | ||
| 14 | 15 | v = open(path.join(path.dirname(__file__), 'VERSION')) | |
@@ -40,7 +41,12 @@ def make_release_tree (self, base_dir, files): | |||
| 40 | 41 | ||
| 41 | 42 | def _stamp_version(filename): | |
| 42 | 43 | found, out = False, [] | |
| 43 | - f = open(filename, 'r') | ||
| 44 | + try: | ||
| 45 | + f = open(filename, 'r') | ||
| 46 | + except (IOError, OSError): | ||
| 47 | + print >> sys.stderr, "Couldn't find file %s to stamp version" % filename | ||
| 48 | + return | ||
| 49 | + #END handle error, usually happens during binary builds | ||
| 44 | 50 | for line in f: | |
| 45 | 51 | if '__version__ =' in line: | |
| 46 | 52 | line = line.replace("'git'", "'%s'" % VERSION) | |
| Back | FazBrowse Home | New Git URL |
0 commit comments