Skip to content

Commit

Permalink
raise exception if hosts and ports do not match
Browse files Browse the repository at this point in the history
  • Loading branch information
jburel committed Mar 4, 2024
1 parent ee24282 commit f30d62a
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/omero/gateway/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1526,10 +1526,18 @@ def __init__(self, username=None, passwd=None, client_obj=None, group=None,

self.host = host
if self.c is not None:
self.host = self.c.getProperty("omero.host")
hc = self.c.getProperty("omero.host")
if self.host is None:
self.host = hc
else if hc != self.host
raise Exception("hosts %s and %s do not match" % (hc, self.host))
self.port = port
if self.c is not None:
self.port = self.c.getProperty("omero.port")
pc = self.c.getProperty("omero.port")
if self.port is None:
self.port = pc
else if pc != self.port
raise Exception("ports %s and %s do not match" % (pc, self.port))
self.secure = secure
self.useragent = useragent
self.userip = userip
Expand Down

0 comments on commit f30d62a

Please sign in to comment.