diff options
Diffstat (limited to 'rwa/support/sessionservice/service.py')
-rwxr-xr-x | rwa/support/sessionservice/service.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/rwa/support/sessionservice/service.py b/rwa/support/sessionservice/service.py index eb588ae..bdd8fbe 100755 --- a/rwa/support/sessionservice/service.py +++ b/rwa/support/sessionservice/service.py @@ -36,6 +36,7 @@ import dbus import dbus.mainloop.glib import dbus.service from gi.repository import GLib +import validators from .config import user_settings from .lock import is_locked, lock, unlock @@ -77,6 +78,16 @@ class RWASupportSessionService(dbus.service.Object): logging.info("D-Bus service has been started.") + def _is_url(self, url: str) -> bool: + """Test if the given string contains an url. + + :param url: The string which should be an URL. + :return: Bool (True=is url) or (False=no url) + """ + valid = validators.url(url) + logging.debug('is url?: "%s": %s', url, valid) + return valid + def _get_web_app_hosts(self) -> str: """Get all registered RWA.Support.WebApp hosts. |