From 6108cbb621eb3b7596d4e01925fce75fa259883f Mon Sep 17 00:00:00 2001 From: Fabio Manganiello Date: Sat, 18 Nov 2023 23:04:19 +0100 Subject: [PATCH] Added `Config.get_device_id()` classmethod. --- platypush/config/__init__.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/platypush/config/__init__.py b/platypush/config/__init__.py index eb84184a0f..6ef459d446 100644 --- a/platypush/config/__init__.py +++ b/platypush/config/__init__.py @@ -581,6 +581,15 @@ class Config: assert workdir return workdir # type: ignore + @classmethod + def get_device_id(cls) -> str: + """ + :return: The configured/default device ID. + """ + device_id = cls._get_instance().get('device_id') + assert device_id + return device_id # type: ignore + @classmethod def get_cachedir(cls) -> str: """