From 99693d39de7afd9465d1ec9190e03b447f602bd2 Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Sun, 4 Oct 2020 19:10:45 +0200 Subject: Some docstring and error message adaptations to namespace changes. --- service.py | 4 ++-- session.py | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/service.py b/service.py index 068f85b..7c056fa 100755 --- a/service.py +++ b/service.py @@ -82,7 +82,7 @@ class RWAService(dbus.service.Object): @dbus.service.method("org.ArcticaProject.RWASupportSessionService", out_signature="s") def start(self) -> str: - """Start a new remote session and register it in RWA. + """Start a new remote session and register it in RWA.Support.WebApp. :return: Result as JSON (D-Bus string) @@ -291,7 +291,7 @@ if __name__ == "__main__": # Create lock file lock() - parser = argparse.ArgumentParser(description="D-Bus Session Service for RWA") + parser = argparse.ArgumentParser(description="D-Bus Session Service for RWA.Support") parser.add_argument( "-m", "--mockup-mode", diff --git a/session.py b/session.py index c25d17b..03ae87b 100644 --- a/session.py +++ b/session.py @@ -130,7 +130,7 @@ class Session: new_file.write("this session is running") def _register_session(self): - """Register session in RWA if not in mockup_session mode.""" + """Register session in RWA.Support.WebApp if not in mockup_session mode.""" if not self.mockup_session: try: r = requests.post( @@ -147,7 +147,7 @@ class Session: raise ConnectionError() logging.info( - f"The session has been registered in RWA with status code {r.status_code} and response {r.content.decode()}." + f"The session has been registered in RWA.Support.WebApp with status code {r.status_code} and response {r.content.decode()}." ) if r.status_code != 200: @@ -178,7 +178,7 @@ class Session: ) logging.info( - f"The session has received its status from RWA with status code {r.status_code} and response {r.content.decode()}." + f"The session has received its status from RWA.Support.WebApp with status code {r.status_code} and response {r.content.decode()}." ) if r.status_code in (401, 402, 403, 404, 405): @@ -214,7 +214,7 @@ class Session: headers=self._api_headers, ) logging.info( - f"The session has marked the job {job} as done in RWA with status code {r.status_code} and response {r.content.decode()}." + f"The session has marked the job {job} as done in RWA.Support.WebApp with status code {r.status_code} and response {r.content.decode()}." ) def push(self): @@ -255,7 +255,7 @@ class Session: STOP_URL, params={"id": self.session_id}, headers=self._api_headers ) logging.info( - f"The stop action has been registered in RWA with status code {r.status_code} and response {r.content.decode()}." + f"The stop action has been registered in RWA.Support.WebApp with status code {r.status_code} and response {r.content.decode()}." ) self.status_text = "stopped" -- cgit v1.2.3