diff --git a/DOCUMENTATION.md b/DOCUMENTATION.md index fe2ee97..bbc592e 100644 --- a/DOCUMENTATION.md +++ b/DOCUMENTATION.md @@ -2244,7 +2244,7 @@ Remove a device environment variable. ### Function: set(uuid_or_id, env_var_name, value) ⇒ None Set the value of a device config variable. - +Note that config variables must start with BALENA_ and RESIN_ prefixes. #### Args: uuid_or_id (Union[str, int]): device uuid (string) or id (int) env_var_name (str): environment variable name. @@ -2252,7 +2252,7 @@ Set the value of a device config variable. #### Examples: ```python ->>> balena.models.device.config_var.device.set('8deb12','test_env4', 'testing1') +>>> balena.models.device.config_var.set('8deb12','BALENA_test_env4', 'testing1') ``` ## DeviceEnvVariable diff --git a/balena/exceptions.py b/balena/exceptions.py index c389b7f..cf57016 100644 --- a/balena/exceptions.py +++ b/balena/exceptions.py @@ -185,7 +185,7 @@ def __init__(self, body, status_code=None): self.message = Message.REQUEST_ERROR.format(body=body) self.body = body self.status_code = status_code - # print(self.message, status_code) + print(self.message, status_code) class NotLoggedIn(BalenaException): diff --git a/balena/models/device.py b/balena/models/device.py index 2c58ea6..d94ceb7 100644 --- a/balena/models/device.py +++ b/balena/models/device.py @@ -2145,14 +2145,14 @@ def get(self, uuid_or_id: Union[str, int], env_var_name: str) -> Optional[str]: def set(self, uuid_or_id: Union[str, int], env_var_name: str, value: str) -> None: """ Set the value of a device config variable. - + Note that config variables must start with BALENA_ and RESIN_ prefixes. Args: uuid_or_id (Union[str, int]): device uuid (string) or id (int) env_var_name (str): environment variable name. value (str): environment variable value. Examples: - >>> balena.models.device.config_var.device.set('8deb12','test_env4', 'testing1') + >>> balena.models.device.config_var.set('8deb12','BALENA_test_env4', 'testing1') """ super(DeviceConfigVariable, self)._set(uuid_or_id, env_var_name, value)