ui-macos: Don't enable connecting for hosts with Custom but zero subnets.

That would cause the sshuttle client to die.
This commit is contained in:
Avery Pennarun
2011-01-18 19:47:59 -08:00
parent 701f59a5b8
commit 342ce12840
3 changed files with 42 additions and 15 deletions

View File

@ -85,6 +85,13 @@ class SshuttleServer(NSObject):
def setError_(self, v):
self._k_error = v
config_changed()
def isValid(self):
if not self.host():
return False
if self.autoNets() == NET_MANUAL and not len(list(self.nets())):
return False
return True
def host(self):
return getattr(self, '_k_host', None)