Skip to content

Commit 1bfb7aa

Browse files
Fix failure on OBJ plugin when CLI is not configured (#725)
1 parent 184b017 commit 1bfb7aa

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
@@ -255,7 +255,7 @@ def plugin_get_value(self, key: str) -> Optional[Any]:
255255
"No running plugin to retrieve configuration for!"
256256
)
257257

258-
username = self.username or self.default_username()
258+
username = self.username or self.default_username() or "DEFAULT"
259259
full_key = f"plugin-{self.running_plugin}-{key}"
260260

261261
if not self.config.has_option(username, full_key):
@@ -553,7 +553,7 @@ def _handle_no_default_user(self): # pylint: disable=too-many-branches
553553

554554
if len(users) == 0:
555555
# config is new or _really_ old
556-
token = self.config.get("DEFAULT", "token")
556+
token = self.config.get("DEFAULT", "token", fallback=None)
557557

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

0 commit comments

Comments
 (0)