summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorBert Vermeulen <bert@biot.com>2013-11-29 13:59:51 +0100
committerBert Vermeulen <bert@biot.com>2013-11-29 13:59:51 +0100
commit169f42726fcd44ca9a98c914b835ae6ff31295c3 (patch)
treec392c492267f18840dbdafd4658ebdb24770d6cf /tools
parent3f5bd4ed85954564b0b6d9819328dbef04d1d3d5 (diff)
downloadlibsigrokdecode-169f42726fcd44ca9a98c914b835ae6ff31295c3.tar.gz
libsigrokdecode-169f42726fcd44ca9a98c914b835ae6ff31295c3.zip
Python 3.2 and portability fixes.
Diffstat (limited to 'tools')
-rwxr-xr-xtools/install-decoders13
1 files changed, 8 insertions, 5 deletions
diff --git a/tools/install-decoders b/tools/install-decoders
index 8134539..4a6e1d9 100755
--- a/tools/install-decoders
+++ b/tools/install-decoders
@@ -2,7 +2,7 @@
#
# This file is part of the libsigrokdecode project.
#
-# Copyright (C) 2012 Bert Vermeulen <bert@biot.com>
+# Copyright (C) 2013 Bert Vermeulen <bert@biot.com>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -50,13 +50,16 @@ def install(srcdir, dstdir):
col = 0
print(msg, end='')
col += len(msg)
- pd_dst = dstdir + '/' + pd
+ pd_dst = os.path.join(dstdir, pd)
try:
os.mkdir(pd_dst)
- except FileExistsError:
- pass
+ except OSError as e:
+ if e.errno != os.errno.EEXIST:
+ raise
+ else:
+ pass
for f in install_list:
- copy(pd_dir + '/' + f, pd_dst)
+ copy(os.path.join(pd_dir, f), pd_dst)
print()