Skip to content

Commit 3073878

Browse files
Merge branch 'dev' into zhiwei/refactor-config-get
2 parents 7e0b31b + 1bfb7aa commit 3073878

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

linodecli/configuration/config.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ def plugin_get_value(self, key: str) -> Optional[Any]:
243243
"No running plugin to retrieve configuration for!"
244244
)
245245

246-
username = self.username or self.default_username()
246+
username = self.username or self.default_username() or "DEFAULT"
247247
full_key = f"plugin-{self.running_plugin}-{key}"
248248

249249
return self.config.get(username, full_key, fallback=None)
@@ -535,7 +535,7 @@ def _handle_no_default_user(self): # pylint: disable=too-many-branches
535535

536536
if len(users) == 0:
537537
# config is new or _really_ old
538-
token = self.config.get("DEFAULT", "token")
538+
token = self.config.get("DEFAULT", "token", fallback=None)
539539

540540
if token is not None:
541541
# there's a token in the config - configure that user

0 commit comments

Comments
 (0)