Commit 41cf9dc5 authored by Tammo Jan Dijkema's avatar Tammo Jan Dijkema
Browse files

Imrpove check for mercurius

parent 55bdbec8
......@@ -28,17 +28,19 @@ class Telescope:
global _telescope__num_instances
self.logger = logging.getLogger(__name__)
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":
self.logger.warning("You are using the actual console, not a demo!")
if consoleHost == 'console' and setmode is not None:
if socket.gethostname() == "mercurius":
self.logger.warning("You are commanding the actual console, not a demo!")
else:
raise ValueError("Talking to the actual console can only be done from mercurius")
raise ValueError("Commanding the actual console can only be done from mercurius")
self.dist_az = None
self.dist_el = None
......
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