mirror of
https://github.com/dtomlinson91/panaetius.git
synced 2025-12-22 04:55:44 +00:00
changing env var to use strings without extra quotes
This commit is contained in:
@@ -15,7 +15,7 @@ from typing import Any
|
|||||||
# import toml
|
# import toml
|
||||||
import yaml
|
import yaml
|
||||||
|
|
||||||
from panaetius.exceptions import KeyErrorTooDeepException, InvalidPythonException
|
from panaetius.exceptions import KeyErrorTooDeepException
|
||||||
|
|
||||||
|
|
||||||
class Config:
|
class Config:
|
||||||
@@ -184,7 +184,8 @@ class Config:
|
|||||||
try:
|
try:
|
||||||
return ast.literal_eval(value)
|
return ast.literal_eval(value)
|
||||||
except (ValueError, SyntaxError):
|
except (ValueError, SyntaxError):
|
||||||
raise InvalidPythonException(f"{value} is not valid Python.") # noqa
|
# string without spaces: ValueError, with spaces; SyntaxError
|
||||||
|
return value
|
||||||
|
|
||||||
def __load_default_value(self, default: Any) -> Any: # noqa
|
def __load_default_value(self, default: Any) -> Any: # noqa
|
||||||
return default
|
return default
|
||||||
|
|||||||
Reference in New Issue
Block a user