equal
deleted
inserted
replaced
308 def OnTaskBarChangeInterface(self, evt): |
308 def OnTaskBarChangeInterface(self, evt): |
309 ip_addr = self.pyroserver.ip_addr |
309 ip_addr = self.pyroserver.ip_addr |
310 ip_addr = '' if ip_addr is None else ip_addr |
310 ip_addr = '' if ip_addr is None else ip_addr |
311 dlg = ParamsEntryDialog(None, _("Enter the IP of the interface to bind"), defaultValue=ip_addr) |
311 dlg = ParamsEntryDialog(None, _("Enter the IP of the interface to bind"), defaultValue=ip_addr) |
312 dlg.SetTests([(re.compile('\d{1,3}(?:\.\d{1,3}){3}$').match, _("IP is not valid!")), |
312 dlg.SetTests([(re.compile('\d{1,3}(?:\.\d{1,3}){3}$').match, _("IP is not valid!")), |
313 ( lambda x:len([x for x in x.split(".") if 0 <= int(x) <= 255]) == 4, _("IP is not valid!")) |
313 (lambda x:len([x for x in x.split(".") if 0 <= int(x) <= 255]) == 4, _("IP is not valid!")) |
314 ]) |
314 ]) |
315 if dlg.ShowModal() == wx.ID_OK: |
315 if dlg.ShowModal() == wx.ID_OK: |
316 self.pyroserver.ip_addr = dlg.GetValue() |
316 self.pyroserver.ip_addr = dlg.GetValue() |
317 self.pyroserver.Stop() |
317 self.pyroserver.Stop() |
318 |
318 |