From e18dfae30ad8030e0b04caaf22e877d13073c168 Mon Sep 17 00:00:00 2001 From: Ken Conley Date: Thu, 11 Aug 2011 20:38:48 +0000 Subject: [PATCH] #3625: rosmake py3k patch. thanks wjwwood --- tools/rosmake/src/rosmake/rosmake.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/tools/rosmake/src/rosmake/rosmake.py b/tools/rosmake/src/rosmake/rosmake.py index 467f8c9f..2d176181 100755 --- a/tools/rosmake/src/rosmake/rosmake.py +++ b/tools/rosmake/src/rosmake/rosmake.py @@ -86,7 +86,15 @@ class Printer: def __setattr__(self, attr, value): """ Delegate access to implementation """ return setattr(self.__instance, attr, value) - + + def __enter__(self): + """Pass through for the __enter__ function for the __instance""" + return self.__instance.__enter__() + + def __exit__(self, mtype, value, tb): + """Pass through for the __exit__ function for the __instance""" + return self.__instance.__exit__(mtype, value, tb) + class __impl(threading.Thread): def __init__(self): threading.Thread.__init__(self)