diff options
-rwxr-xr-x | scripts/jhbuild/rewrite.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/scripts/jhbuild/rewrite.py b/scripts/jhbuild/rewrite.py index ecd6444860..ef292763de 100755 --- a/scripts/jhbuild/rewrite.py +++ b/scripts/jhbuild/rewrite.py | |||
@@ -226,7 +226,7 @@ class Emitter(object): | |||
226 | f.close() | 226 | f.close() |
227 | 227 | ||
228 | for key in bb.data.keys(package): | 228 | for key in bb.data.keys(package): |
229 | fdata.replace('@@'+key+'@@', bb.data.getVar(key, package)) | 229 | fdata = fdata.replace('@@'+key+'@@', bb.data.getVar(key, package)) |
230 | else: | 230 | else: |
231 | for key in bb.data.keys(package): | 231 | for key in bb.data.keys(package): |
232 | if key == '_handler': | 232 | if key == '_handler': |
@@ -266,10 +266,12 @@ def _test(): | |||
266 | 266 | ||
267 | emitter = Emitter(filefunc) | 267 | emitter = Emitter(filefunc) |
268 | for package in handlers.packages: | 268 | for package in handlers.packages: |
269 | template = os.path.join(emitter.filefunc(package), '.in') | 269 | template = emitter.filefunc(package) + '.in' |
270 | if os.path.exists(template): | 270 | if os.path.exists(template): |
271 | print("%s exists, emitting based on template" % template) | ||
271 | emitter.write(package, template) | 272 | emitter.write(package, template) |
272 | else: | 273 | else: |
274 | print("%s does not exist, emitting non-templated" % template) | ||
273 | emitter.write(package) | 275 | emitter.write(package) |
274 | 276 | ||
275 | if __name__ == "__main__": | 277 | if __name__ == "__main__": |