Merge pull request #35452 from dirk-thomas/patch-1

move routine call out of try/except block
This commit is contained in:
Mike Place 2016-08-16 10:37:26 +09:00 committed by GitHub
commit 0708b546cb

View File

@ -139,9 +139,10 @@ class Target(object):
Execute the correct tgt_type routine and return
'''
try:
return getattr(self, 'get_{0}'.format(self.tgt_type))()
routine = getattr(self, 'get_{0}'.format(self.tgt_type))
except AttributeError:
return {}
return routine()
def get_glob(self):
'''