verify that setup.py jsversion did something

This commit is contained in:
Min RK 2015-01-30 14:19:25 -08:00
parent 5184196e04
commit 01de88687d

View File

@ -740,10 +740,14 @@ class JavascriptVersion(Command):
with open(nsfile) as f:
lines = f.readlines()
with open(nsfile, 'w') as f:
found = False
for line in lines:
if line.startswith("IPython.version"):
line = 'IPython.version = "{0}";\n'.format(version)
if line.strip().startswith("IPython.version"):
line = ' IPython.version = "{0}";\n'.format(version)
found = True
f.write(line)
if not found:
raise RuntimeError("Didn't find IPython.version line in %s" % nsfile)
def css_js_prerelease(command):