Changeset 5593

Show
Ignore:
Timestamp:
06/04/10 23:15:34 (3 years ago)
Author:
kosma
Message:

platform check: convert find to startswith

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • UMPA/branch/link-layer-integration/umit/umpa/_sockets.py

    r5592 r5593  
    4444    _l3model = 'AF_INET' 
    4545    _l3quirk = None 
    46 elif sys.platform.find('freebsd') != -1 or \ 
    47      sys.platform.find('netbsd') != -1 or \ 
    48      sys.platform.find('darwin') != -1: 
     46elif sys.platform.startswith('freebsd') or \ 
     47     sys.platform.startswith('netbsd') or \ 
     48     sys.platform.startswith('darwin'): 
    4949    _l2model = 'bpf' 
    5050    _l3model = 'AF_INET' 
    5151    _l3quirk = 'ntohs' 
    52 elif sys.platform.find('openbsd') != -1: 
     52elif sys.platform.startswith('openbsd'): 
    5353    _l2model = 'bpf' 
    5454    _l3model = 'AF_INET',