summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Gevers <elbrus@debian.org>2020-12-17 10:10:19 +0100
committerPaul Gevers <elbrus@debian.org>2020-12-17 10:24:48 +0100
commit3dd6e33173c357627d577daf6319850522e0ad1d (patch)
tree3cf80f588810a2b2875ebf629518a248d1f4d313
parent5c7c8e788fc63485a8c2b3bbb1d9fc2d6e7b6503 (diff)
Make install code python3 compatible
-rw-r--r--install.sh2
-rw-r--r--recode-0.1.py4
2 files changed, 3 insertions, 3 deletions
diff --git a/install.sh b/install.sh
index 3b9c885..8b1e4d4 100644
--- a/install.sh
+++ b/install.sh
@@ -18,7 +18,7 @@ for i in "$@" ; do
for f in *ppd ; do
if grep -q MacStandard $f ; then
echo CONVERTING $f
- python $H/recode-0.1.py $f > $D/$f
+ python3 $H/recode-0.1.py $f > $D/$f
else
echo COPYING $f
cp $f $D/$f
diff --git a/recode-0.1.py b/recode-0.1.py
index 7ad06e2..e7e0723 100644
--- a/recode-0.1.py
+++ b/recode-0.1.py
@@ -1,4 +1,4 @@
-#! /usr/bin/env python
+#! /usr/bin/env python3
#
#recode.py - recode a PPD file's translation strings
#Version 0.1
@@ -76,7 +76,7 @@ def str2ppd(ts):
ppdstr.append('<'+hex(ord(char))[2:4]+'>')
else:
#anything else is NOT allowed
- raise ValueError, 'Bad char value '+hex(ord(char))+' in translation string'
+ raise ValueError('Bad char value '+hex(ord(char))+' in translation string')
return ''.join(ppdstr)