summaryrefslogtreecommitdiff
path: root/autoscripts
diff options
context:
space:
mode:
Diffstat (limited to 'autoscripts')
-rw-r--r--autoscripts/postinst-python12
1 files changed, 7 insertions, 5 deletions
diff --git a/autoscripts/postinst-python b/autoscripts/postinst-python
index 2ecb99b..6f1f9a5 100644
--- a/autoscripts/postinst-python
+++ b/autoscripts/postinst-python
@@ -1,6 +1,8 @@
PYTHON=#PYVER#
-DIRLIST="#DIRLIST#"
-for i in $DIRLIST ; do
- $PYTHON -O /usr/lib/$PYTHON/compileall.py -q $i
- $PYTHON /usr/lib/$PYTHON/compileall.py -q $i
-done
+if which $PYTHON >/dev/null 2>&1; then
+ DIRLIST="#DIRLIST#"
+ for i in $DIRLIST ; do
+ $PYTHON -O /usr/lib/$PYTHON/compileall.py -q $i
+ $PYTHON /usr/lib/$PYTHON/compileall.py -q $i
+ done
+fi