do not use old servers
authorThomasV <thomasv@gitorious>
Sun, 4 Nov 2012 10:08:05 +0000 (11:08 +0100)
committerThomasV <thomasv@gitorious>
Sun, 4 Nov 2012 10:08:05 +0000 (11:08 +0100)
lib/interface.py

index 699b400..89934f8 100644 (file)
@@ -105,7 +105,11 @@ class Interface(threading.Thread):
                                 ports.append((v[0], v[1:]))
                             if re.match("v(.?)+", v):
                                 version = v[1:]
-                    if ports and version:
+                    try: 
+                        is_recent = float(version)>=0.5
+                    except: 
+                        is_recent = False
+                    if ports and is_recent:
                         servers.append((host, ports))
                 self.servers = servers
                 self.trigger_callback('peers')