mirror of
https://github.com/EDCD/EDMarketConnector.git
synced 2026-11-22 03:06:59 +03:00
Change darwin __raw_get() check for list to check it's not the OTHERS
On darwin this comes back with the type `__NSCFArray`, which I can't
find the definition of (in order to test against it). So instead let's
check that `res` is not-None, and not one of `str` or `int`, because
then it should be (meant to be) `list`.
Yes, this is weird given the pre-rewrite code is:
```python
def get(self, key: str) -> Union[None, list, str]:
"""Look up a string configuration value."""
val = self.settings.get(key)
if val is None:
return None
elif isinstance(val, str):
return str(val)
elif isinstance(val, list):
return list(val) # make writeable
else:
return None
```
But maybe something changed since 3.43 was tested and built.
This commit is contained in:
1 parent
0f83e5b035
commit
1c269e9f4b
1 file changed
+1
-1
Reference in new issue
Block a user