Skip to content

Commit

Permalink
Fixed undefined server_region
Browse files Browse the repository at this point in the history
  • Loading branch information
mandarons committed Nov 27, 2024
1 parent 489bdd0 commit cf3146a
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 2 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,6 @@ celerybeat.pid
*.sage.py

# Environments
.env
.venv
env/
venv/
Expand Down
2 changes: 1 addition & 1 deletion src/sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,12 @@ def sync():
username = config_parser.get_username(config=config)
if username:
try:
server_region = config_parser.get_region(config=config)
if ENV_ICLOUD_PASSWORD_KEY in os.environ:
password = os.environ.get(ENV_ICLOUD_PASSWORD_KEY)
utils.store_password_in_keyring(username=username, password=password)
else:
password = utils.get_password_from_keyring(username=username)
server_region = config_parser.get_region(config=config)
api = get_api_instance(username=username, password=password, server_region=server_region)
if not api.requires_2sa:
if "drive" in config and enable_sync_drive:
Expand Down
1 change: 1 addition & 0 deletions tests/.env
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ENV_CONFIG_FILE_PATH=./tests/data/test_config.yaml

0 comments on commit cf3146a

Please sign in to comment.