We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 99c028b commit 4926010Copy full SHA for 4926010
src/actinia/actinia.py
@@ -148,9 +148,13 @@ def __request_locations(self):
148
raise Exception("Authentication is not set.")
149
150
url = f"{self.url}/locations"
151
- loc_names = request_and_check(
+ loc_response = request_and_check(
152
"GET", url, **{"timeout": self.timeout, "auth": (self.__auth)}
153
- )["locations"]
+ )
154
+ loc_names = loc_response.get("locations") or loc_response.get("projects")
155
+ if not loc_names:
156
+ raise Exception("Authentication is not set.")
157
+
158
loc = {
159
lname: Location(lname, self, self.__auth) for lname in loc_names
160
}
0 commit comments