debian stopped having a python link for reasons, so try to find one a
bit harder.

Signed-off-by: Daniel Vetter <daniel.vet...@intel.com>
---
 dim | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/dim b/dim
index df7fc1dd4791..e8bf2bb4f058 100755
--- a/dim
+++ b/dim
@@ -76,6 +76,8 @@ dim=$(basename $0)
 dim_today=$(date +%Y-%m-%d)
 dim_timestamp="$(date --utc +%Yy-%mm-%dd-%Hh-%Mm-%Ss) UTC"
 
+dim_python=$(which python || which python3)
+
 dim_fdo_cookie="--push-option 
fdo.pushedWithDim=this-was-pushed-with-dim-and-not-manually"
 
 maintainer_tools_https=https://gitlab.freedesktop.org/drm/maintainer-tools.git
@@ -427,7 +429,7 @@ function check_dim_config
 # $1 = file
 message_get_id ()
 {
-       python <<EOF
+       $dim_python <<EOF
 from email.parser import Parser
 headers = Parser().parse(open('$1', 'r'))
 message_id = headers['message-id']
@@ -438,7 +440,7 @@ EOF
 
 message_print_body ()
 {
-       python2 <<EOF
+       $dim_python <<EOF
 import email
 
 def print_msg(file):
-- 
2.28.0

_______________________________________________
dim-tools mailing list
dim-tools@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dim-tools

Reply via email to