Changeset 20674


Ignore:
Timestamp:
05/31/16 00:28:56 (9 years ago)
Author:
bdef
Message:

BUG: adding test on mac specific code to avoid Spyder fail

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/m/os/issmssh.py

    r17480 r20674  
    11from socket import gethostname
     2from sys import platform as _platform
    23import subprocess
    34import os
     
    4546        # (from http://code.google.com/p/robotframework/issues/detail?id=995)
    4647
    47         # Make FreeBSD use blocking I/O like other platforms
    48         import sys
    49         import fcntl
    50         from os import O_NONBLOCK
     48        if _platform == "darwin":
     49                # Make FreeBSD use blocking I/O like other platforms
     50                import sys
     51                import fcntl
     52                from os import O_NONBLOCK
     53               
     54                fd = sys.stdin.fileno()
     55                flags = fcntl.fcntl(fd, fcntl.F_GETFL)
     56                fcntl.fcntl(fd, fcntl.F_SETFL, flags & ~O_NONBLOCK)
     57               
     58                fd = sys.stdout.fileno()
     59                flags = fcntl.fcntl(fd, fcntl.F_GETFL)
     60                fcntl.fcntl(fd, fcntl.F_SETFL, flags & ~O_NONBLOCK)
    5161
    52         fd = sys.stdin.fileno()
    53         flags = fcntl.fcntl(fd, fcntl.F_GETFL)
    54         fcntl.fcntl(fd, fcntl.F_SETFL, flags & ~O_NONBLOCK)
    55 
    56         fd = sys.stdout.fileno()
    57         flags = fcntl.fcntl(fd, fcntl.F_GETFL)
    58         fcntl.fcntl(fd, fcntl.F_SETFL, flags & ~O_NONBLOCK)
    59 
Note: See TracChangeset for help on using the changeset viewer.