]> granicus.if.org Git - python/commitdiff
fix for netbsd.
authorGregory P. Smith <greg@mad-scientist.com>
Sun, 17 Oct 2010 00:17:24 +0000 (00:17 +0000)
committerGregory P. Smith <greg@mad-scientist.com>
Sun, 17 Oct 2010 00:17:24 +0000 (00:17 +0000)
Lib/test/test_socket.py

index aadfdfaf206adb9cbc2844c3a7ede79e270ee71c..511e590660283e97480a6935ad0c46131d2b0fb4 100644 (file)
@@ -362,8 +362,10 @@ class GeneralModuleTests(unittest.TestCase):
         # Find one service that exists, then check all the related interfaces.
         # I've ordered this by protocols that have both a tcp and udp
         # protocol, at least for modern Linuxes.
-        if sys.platform in ('linux2', 'freebsd4', 'freebsd5', 'freebsd6',
-                            'freebsd7', 'freebsd8', 'darwin'):
+        if (sys.platform.startswith('linux') or
+            sys.platform.startswith('freebsd') or
+            sys.platform.startswith('netbsd') or
+            sys.platform == 'darwin'):
             # avoid the 'echo' service on this platform, as there is an
             # assumption breaking non-standard port/protocol entry
             services = ('daytime', 'qotd', 'domain')