Skip to content

Commit

Permalink
Merge pull request #280 from openfisca/config_path
Browse files Browse the repository at this point in the history
Fix test_config_files_directory config.ini
  • Loading branch information
clallemand committed Dec 18, 2023
2 parents ac4fc28 + 6bbd822 commit 72bdbf8
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

# 2.0.2 [#280](https://github.com/openfisca/openfisca-survey-manager/pull/280)

- Add a try/except for the tests config in openfisca_survey_manager/__init__.py

# 2.0.1 [#279](https://github.com/openfisca/openfisca-survey-manager/pull/279)

#### Technical changes
Expand Down
8 changes: 6 additions & 2 deletions openfisca_survey_manager/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,12 @@
config_ini = file.read()

config_ini = config_ini.format(location = openfisca_survey_manager_location)
with open(os.path.join(test_config_files_directory, 'config.ini'), "w+") as file:
file.write(config_ini)
try:
with open(os.path.join(test_config_files_directory, 'config.ini'), "w+") as file:
file.write(config_ini)
except PermissionError:
log.debug(f"config.ini can't be written in the test config files directory{test_config_files_directory}")
pass

# GitHub Actions test
is_in_ci = 'CI' in os.environ
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

setup(
name = 'OpenFisca-Survey-Manager',
version = '2.0.1',
version = '2.0.2',
author = 'OpenFisca Team',
author_email = 'contact@openfisca.fr',
classifiers = [classifier for classifier in classifiers.split('\n') if classifier],
Expand Down

0 comments on commit 72bdbf8

Please sign in to comment.