diff --git a/PyOphidia/client.py b/PyOphidia/client.py index 62a3e7d..62e5914 100644 --- a/PyOphidia/client.py +++ b/PyOphidia/client.py @@ -120,7 +120,7 @@ def __init__(self, username="", password="", server="", port="", token="", read_ self.last_return_value = 0 self.last_error = "" self.last_exec_time = 0.0 - + if local_mode is False: if read_env is False: self.username = username @@ -185,7 +185,7 @@ def __init__(self, username="", password="", server="", port="", token="", read_ self.username = None self.password = None self.server = None - self.port = None + self.port = None def __del__(self): del self.api_mode @@ -612,7 +612,7 @@ def resume_session(self, display=False): """ if self.local_mode is True: - raise RuntimeError("this function cannot be run when local_mode is set") + raise RuntimeError("this function cannot be run when local_mode is set") if self.username is None or self.password is None or self.server is None or self.port is None: raise RuntimeError("one or more login parameters are None") query = "operator=oph_get_config;key=OPH_SESSION_ID;" diff --git a/PyOphidia/cube.py b/PyOphidia/cube.py index efe693e..a6b3eb4 100644 --- a/PyOphidia/cube.py +++ b/PyOphidia/cube.py @@ -3394,7 +3394,7 @@ def createScript(function): from time import time base_path = expanduser("~") + "/.ophidia/" - script_path = base_path + function.__name__ + str(int(time() * 10**6)) + ".py" + script_path = base_path + function.__name__ + str(int(time() * 10 ** 6)) + ".py" try: # Check if hidden folder exists or create it otherwise