Merge "re-raise the original Exception instead of raising a new one"

This commit is contained in:
Zuul 2018-02-23 16:36:23 +00:00 committed by Gerrit Code Review
commit 96aa1c756f
3 changed files with 4 additions and 4 deletions

View File

@ -156,7 +156,7 @@ class JenkinsManager(object):
'version': '', 'version': '',
'longName': ''}] 'longName': ''}]
else: else:
raise e raise
logger.debug("Jenkins Plugin Info {0}".format(pformat(plugins_list))) logger.debug("Jenkins Plugin Info {0}".format(pformat(plugins_list)))
return plugins_list return plugins_list

View File

@ -88,7 +88,7 @@ class JobCache(object):
# same time and that the other instance created the directory # same time and that the other instance created the directory
# after we made the check, in which case there is no error # after we made the check, in which case there is no error
if ose.errno != errno.EEXIST: if ose.errno != errno.EEXIST:
raise ose raise
return path return path
def set(self, job, md5): def set(self, job, md5):

View File

@ -363,8 +363,8 @@ class TestTestsMultiPath(CmdTestsBase):
def check_dirs_match(self, expected_dir): def check_dirs_match(self, expected_dir):
try: try:
self.assertThat(self.output_dir, MatchesDir(expected_dir)) self.assertThat(self.output_dir, MatchesDir(expected_dir))
except testtools.matchers.MismatchError as e: except testtools.matchers.MismatchError:
raise e raise
else: else:
shutil.rmtree(self.output_dir) shutil.rmtree(self.output_dir)