diff options
author | Sébastien Helleu <flashcode@flashtux.org> | 2018-04-11 23:02:02 +0200 |
---|---|---|
committer | Sébastien Helleu <flashcode@flashtux.org> | 2018-04-11 23:02:02 +0200 |
commit | cb4348df612e76cc3fbf65081170dd64bd38ecd2 (patch) | |
tree | 89ad340124e13c0cb7f3094a0b75017a0ca060b8 /tests/scripts/python | |
parent | da960e9176c1dad6cce8317aaed010fd541547bd (diff) | |
download | weechat-cb4348df612e76cc3fbf65081170dd64bd38ecd2.zip |
tests: fix AST return in Perl
Diffstat (limited to 'tests/scripts/python')
-rwxr-xr-x | tests/scripts/python/unparse.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/tests/scripts/python/unparse.py b/tests/scripts/python/unparse.py index f3e265a4b..423db1549 100755 --- a/tests/scripts/python/unparse.py +++ b/tests/scripts/python/unparse.py @@ -460,7 +460,14 @@ class UnparsePerl(UnparsePython): """Add an AST Return in output.""" self.fill('return') if node.value: - self.add(' ', node.value, ';') + self.add( + ' ', + (self.prefix, + '%' if isinstance(node.value, ast.Dict) else '$'), + node.value, + (self.prefix, None), + ';', + ) def _ast_str(self, node): """Add an AST Str in output.""" |