diff --git a/.travis.yml b/.travis.yml index c35c2ba..670a946 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,11 +3,11 @@ cache: pip python: - "2.7" - "3.6" - - "3.7-dev" + - "3.7" install: pip install flake8 -script: +script: - flake8 picoscope setup.py - flake8 examples/* @@ -19,6 +19,3 @@ deploy: on: tags: true python: 3.6 - -dist: trusty -sudo: false diff --git a/picoscope/darwin_utils.py b/picoscope/darwin_utils.py index 527be00..478df39 100644 --- a/picoscope/darwin_utils.py +++ b/picoscope/darwin_utils.py @@ -4,6 +4,8 @@ import subprocess import tempfile +import sys + def LoadLibraryDarwin(library): """Wrapper around cdll.LoadLibrary that works around how SIP breaks @@ -23,9 +25,7 @@ def LoadLibraryDarwin(library): return cdll.LoadLibrary(library) except OSError: # 2.7 Fix. This only fixes flake8 - try: - FileNotFoundError - except NameError: + if sys.version_info[0] == 2: FileNotFoundError = IOError if not Path(PICO_LIB_PATH).is_dir(): raise FileNotFoundError(