]> sigrok.org Git - libsigrokdecode.git/commitdiff
install: unbreak installation with Python 3.7 (os.errno)
authorGerhard Sittig <redacted>
Sat, 25 Aug 2018 13:20:10 +0000 (15:20 +0200)
committerGerhard Sittig <redacted>
Sat, 25 Aug 2018 13:20:10 +0000 (15:20 +0200)
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'.

tools/install-decoders

index 3772bd5aefbc108b0698c3645d57bfe0ad7e0e46..30360dbd9e5515d5c37adc6aac4a2485f9159053 100755 (executable)
@@ -18,6 +18,7 @@
 ## along with this program; if not, see <http://www.gnu.org/licenses/>.
 ##
 
+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