Skip to content

Commit 4d00b85

Browse files
authored
Merge pull request #507 from rhubert/fixGeneratorsError
generators: fix ParseError reporting
2 parents 1653730 + 473d21f commit 4d00b85

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

pym/bob/generators/EclipseCdtGenerator.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
from os.path import expanduser
1515
from os.path import join
1616
from bob.utils import summonMagic, removePath
17+
from bob.errors import ParseError
1718
from collections import OrderedDict
1819
from shlex import quote
1920

@@ -233,7 +234,7 @@ def eclipseCdtGenerator(package, argv, extra, bobRoot):
233234
if os.path.exists(i):
234235
includeDirs.append(i)
235236
except re.error as e:
236-
raise ParseError("Invalid regular expression '{}': {}".format(e.pattern), e)
237+
raise ParseError("Invalid regular expression '{}': {}".format(e.pattern, e))
237238

238239
with open(os.path.join(destination, ".cproject"), 'w') as cProjectFile:
239240
cProjectFile.write(cProjectHeader)

pym/bob/generators/QtCreatorGenerator.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
from os.path import expanduser
1616
from os.path import join
1717
from bob.utils import removePath, isWindows
18-
from bob.errors import BuildError
18+
from bob.errors import BuildError, ParseError
1919
from bob.utils import summonMagic, hashFile
2020
from collections import OrderedDict, namedtuple
2121
from bob.tty import colorize, WARNING
@@ -227,7 +227,7 @@ def qtProjectGenerator(package, argv, extra, bobRoot):
227227
else:
228228
_kit = re.compile(r""+args.kit)
229229
except re.error as e:
230-
raise ParseError("Invalid regular expression '{}': {}".format(e.pattern), e)
230+
raise ParseError("Invalid regular expression '{}': {}".format(e.pattern, e))
231231

232232
getCheckOutDirs(package, excludes, dirs)
233233
if not projectName:

0 commit comments

Comments
 (0)