Commit 3d283bf4 authored by Tammo Jan Dijkema's avatar Tammo Jan Dijkema

Undo change of parameter names

parent 79aebd63
Pipeline #20 failed with stages
......@@ -19,24 +19,24 @@ __version__ = "1.1.1"
class Telescope:
def __init__(self, setMode=None, consoleHost=None):
def __init__(self, setmode=None, consoleHost=None):
"""
Initializes a telescope instance
:param setMode: The mode for writing. Can be 'J2000' or 'AZEL'
:param setmode: The mode for writing. Can be 'J2000' or 'AZEL'
:param consoleHost: Address of the console. E.g. 'console' or 'consoledemo.dmz.camras.nl'
"""
global _telescope__num_instances
if setMode not in ('J2000', 'AZEL', None):
raise ValueError("Mode must be None, 'J2000' or 'AZEL', not " + setMode)
self.setmode = setMode
if setmode not in ('J2000', 'AZEL', None):
raise ValueError("Mode must be None, 'J2000' or 'AZEL', not " + setmode)
self.setmode = setmode
if consoleHost is None:
consoleHost = config.get('Console', 'HostName')
if consoleHost == 'console':
if setMode is not None and socket.gethostname() == "mercurius":
logging.warning("You are using the actual console, not a demo!")
if setmode is not None and socket.gethostname() == "mercurius":
self.logger.warning("You are using the actual console, not a demo!")
else:
raise ValueError("Talking to the actual console can only be done from mercurius")
......@@ -345,5 +345,5 @@ class Telescope:
class telescope(Telescope):
def __init__(self, *args, **kwargs):
super(Telescope, self).__init__(*args, **kwargs)
Telescope.__init__(self, *args, **kwargs)
logging.warning("Please use the new class name Telescope (with capital T)")
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment