avoid multiple returns of same value

Found by Sonarqube.
This commit is contained in:
Sarah Hoffmann
2021-07-11 18:23:42 +02:00
parent 27af9b102c
commit 3661f7a321

View File

@@ -274,9 +274,8 @@ class SPImporter():
(self.phplib_dir / 'migration/PhraseSettingsToJson.php').resolve(), (self.phplib_dir / 'migration/PhraseSettingsToJson.php').resolve(),
file_path], check=True) file_path], check=True)
LOG.warning('special_phrase configuration file has been converted to json.') LOG.warning('special_phrase configuration file has been converted to json.')
return json_file_path
except subprocess.CalledProcessError: except subprocess.CalledProcessError:
LOG.error('Error while converting %s to json.', file_path) LOG.error('Error while converting %s to json.', file_path)
raise raise
else:
return json_file_path return json_file_path