From ca063b46c423bc24ee6697cf17779e946cefc73a Mon Sep 17 00:00:00 2001 From: Tim Rakowski Date: Tue, 26 Mar 2019 19:53:29 +0100 Subject: [PATCH] Fixed unhandled config context options warning (#489) --- catkin_tools/context.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/catkin_tools/context.py b/catkin_tools/context.py index 22a9d478..ec31a14e 100644 --- a/catkin_tools/context.py +++ b/catkin_tools/context.py @@ -295,10 +295,6 @@ def __init__( """ self.__locked = False - # Check for unhandled context options - if len(kwargs) > 0: - print('Warning: Unhandled config context options: {}'.format(kwargs), file=sys.stderr) - # Validation is done on assignment self.workspace = workspace @@ -312,7 +308,11 @@ def __init__( default = space_dict['default'] if space_suffix and space != 'source': default += space_suffix - setattr(self, key_name, kwargs.get(key_name, default)) + setattr(self, key_name, kwargs.pop(key_name, default)) + + # Check for unhandled context options + if len(kwargs) > 0: + print('Warning: Unhandled config context options: {}'.format(kwargs), file=sys.stderr) self.destdir = os.environ['DESTDIR'] if 'DESTDIR' in os.environ else None