diff --git a/src/omero/gateway/__init__.py b/src/omero/gateway/__init__.py index 176800d55..ea308f6ba 100644 --- a/src/omero/gateway/__init__.py +++ b/src/omero/gateway/__init__.py @@ -2148,15 +2148,14 @@ def connect(self, sUuid=None): logger.debug("Ooops. no self._c") return False try: - if self.c is not None: - try: - sid = self.c.getSessionId() - # we have a session already from the client - if sUuid is None or sid == sUuid: - logger.debug('connected via client') - return True - except omero.ClientError: # no session available - pass + try: + sid = self.c.getSessionId() + # we have a session already from the client + if sUuid is None or sid == sUuid: + logger.debug('connected via client') + return True + except omero.ClientError: # no session available + pass if self._sessionUuid is None and sUuid: self._sessionUuid = sUuid