From: Gerhard Sittig Date: Sat, 25 Aug 2018 13:20:10 +0000 (+0200) Subject: install: unbreak installation with Python 3.7 (os.errno) X-Git-Url: https://sigrok.org/gitweb/?p=libsigrokdecode.git;a=commitdiff_plain;h=5f7742af35b472003f57634909161708ff2d986f;ds=sidebyside install: unbreak installation with Python 3.7 (os.errno) The os.errno module has not been an official feature. Python 3.7 removed the corresponding import. This broke the installation of decoders. Prefer 'errno' over 'os.errno'. --- diff --git a/tools/install-decoders b/tools/install-decoders index 3772bd5..30360db 100755 --- a/tools/install-decoders +++ b/tools/install-decoders @@ -18,6 +18,7 @@ ## along with this program; if not, see . ## +import errno import os import sys from shutil import copy @@ -64,7 +65,7 @@ def install(srcdir, dstdir, s): try: os.mkdir(pd_dst) except OSError as e: - if e.errno != os.errno.EEXIST: + if e.errno != errno.EEXIST: raise else: pass