Skip to content

Commit

Permalink
Specify yaml loader
Browse files Browse the repository at this point in the history
  • Loading branch information
antonku committed Aug 9, 2019
1 parent 2b96066 commit fb2ae48
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion ncssl_api_client/config/api/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

try:
with open(user_api_settings_path) as f:
settings = yaml.load(f)
settings = yaml.load(f, Loader=yaml.FullLoader)

locals().update(settings)
except EnvironmentError: # FileNotFoundError
Expand Down
2 changes: 1 addition & 1 deletion ncssl_api_client/config/crypto/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

try:
with open(user_crypto_settings_path) as f:
settings = yaml.load(f)
settings = yaml.load(f, Loader=yaml.FullLoader)

locals().update(settings)
except EnvironmentError: # FileNotFoundError
Expand Down
2 changes: 1 addition & 1 deletion ncssl_api_client/configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def setup_configs():
if not os.path.exists(user_api_config_path):
source_api_config_path = DELIMITER.join([PACKAGE_DIR, CONFIG_DIR, API_DIR, SETTINGS_FILE_NAME])
with open(source_api_config_path) as f:
source_api_config = yaml.load(f)
source_api_config = yaml.load(f, Loader=yaml.FullLoader)
api_config = update_with_user_api_info(source_api_config)
stream = open(user_api_config_path, 'w')
yaml.safe_dump(api_config, stream, default_flow_style=False, indent=4, width=79)
Expand Down

0 comments on commit fb2ae48

Please sign in to comment.