#!/usr/bin/env python3
-#
-# This file is part of the libsigrokdecode project.
-#
-# Copyright (C) 2012 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
-# the Free Software Foundation; either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, see <http://www.gnu.org/licenses/>.
-#
+##
+## This file is part of the libsigrokdecode project.
+##
+## 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
+## the Free Software Foundation; either version 3 of the License, or
+## (at your option) any later version.
+##
+## This program is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+## GNU General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with this program; if not, see <http://www.gnu.org/licenses/>.
+##
import os
import sys
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()