Skip to content

Commit 358e05c

Browse files
authored
Merge pull request #23 from machow/fix-rsc-key-name
fix!: correct rsc env api key name
2 parents 340d240 + dfb8296 commit 358e05c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pins/rsconnect/api.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
from typing import Sequence, TypeVar, Generic
1414

1515

16+
RSC_API_KEY = "CONNECT_API_KEY"
1617
RSC_CODE_OBJECT_DOES_NOT_EXIST = 4
1718
RSC_CODE_INVALID_NUMERIC_PATH = 3
1819

@@ -164,7 +165,7 @@ def _get_api_key(self):
164165
if self.api_key is not None:
165166
return self.api_key
166167

167-
return os.environ["RSCONNECT_API_KEY"]
168+
return os.environ[RSC_API_KEY]
168169

169170
def _get_headers(self):
170171
return {"Authorization": f"key {self._get_api_key()}"}

0 commit comments

Comments
 (0)