[pypy-svn] r12302 - pypy/dist/pypy/tool
tismer at codespeak.net
tismer at codespeak.net
Sun May 15 18:11:59 CEST 2005
Author: tismer
Date: Sun May 15 18:11:59 2005
New Revision: 12302
Modified:
pypy/dist/pypy/tool/sourcetools.py
Log:
trying to give better info in case we cannot find the source code
Modified: pypy/dist/pypy/tool/sourcetools.py
==============================================================================
--- pypy/dist/pypy/tool/sourcetools.py (original)
+++ pypy/dist/pypy/tool/sourcetools.py Sun May 15 18:11:59 2005
@@ -58,7 +58,11 @@
Indentation is automatically corrected.
"""
if self.srctext:
- p = self.srctext.index(src)
+ try:
+ p = self.srctext.index(src)
+ except ValueError, e:
+ e.args = "Source text not found in %s - use a raw string" % self.srcname
+ raise
prelines = self.srctext[:p].count("\n") + 1
else:
prelines = 0
More information about the Pypy-commit
mailing list