def connect(self): ''' Attempts to connect to a Double Barrel Server first, then connects directly to Shotgun if failed. ''' # Attempt to open a socket at the host and port. sgclient = DoubleBarrelClient(self, self.host(), self.port()) if sgclient.connect(): self._sgclient = sgclient if not self._sgclient: Shotgun.connect(self)