Skip to content

Commit

Permalink
Make BypassStdoutInterpreter compatible with EmPy 4.x (#664)
Browse files Browse the repository at this point in the history
  • Loading branch information
cottsay committed Sep 10, 2024
1 parent 7cb836e commit 927af5e
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions colcon_core/shell/template/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,12 @@ def expand_template(template_path, destination_path, data):
class BypassStdoutInterpreter(Interpreter):
"""Interpreter for EmPy which keeps `stdout` unchanged."""

def installProxy(self): # noqa: D102 N802
def installProxy(self, *args, **kwargs): # noqa: D102 N802
# avoid replacing stdout with ProxyFile
pass
# in EmPy 3.x, this function performed in-place modification.
# in EmPy 4.x, it is passed the output stream and is expected to
# return the output stream.
return next(iter(args), None)


cached_tokens = {}
Expand Down

0 comments on commit 927af5e

Please sign in to comment.