LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File msm-use-python3.patch of Package mycroft-core (Project home:alarrosa:packages)

From: Antonio Larrosa <larrosa@kde.org
Subject: Make msm use python3

Also, fix hashlib.md5 call for python3, which requires
the string to be encoded.

Index: mycroft-core-release-v0.9.16/msm/msm
===================================================================
--- mycroft-core-release-v0.9.16.orig/msm/msm
+++ mycroft-core-release-v0.9.16/msm/msm
@@ -136,47 +136,47 @@ update_started="false"
 remove_started="false"
 function send_start_install () {
     if [[ "${install_started}" == "false" ]] ; then
-        python -m mycroft.messagebus.send msm.installing
+        python3 -m mycroft.messagebus.send msm.installing
         install_started="true"
     fi
 }
 function send_start_update () {
     if [[ "${update_started}" == "false" ]] ; then
-        python -m mycroft.messagebus.send msm.updating
+        python3 -m mycroft.messagebus.send msm.updating
         update_started="true"
     fi
 }
 function send_start_remove () {
     if [[ "${remove_started}" == "false" ]] ; then
-        python -m mycroft.messagebus.send msm.removing
+        python3 -m mycroft.messagebus.send msm.removing
         remove_started="true"
     fi
 }
 function send_install_success () {
-    python -m mycroft.messagebus.send msm.install.succeeded "{\"skill\": \"${1}\" }"
+    python3 -m mycroft.messagebus.send msm.install.succeeded "{\"skill\": \"${1}\" }"
 }
 function send_install_fail () {
-    python -m mycroft.messagebus.send msm.install.failed "{\"skill\": \"${1}\", \"error\" : ${2} }"
+    python3 -m mycroft.messagebus.send msm.install.failed "{\"skill\": \"${1}\", \"error\" : ${2} }"
 }
 function send_remove_success () {
-    python -m mycroft.messagebus.send msm.remove.succeeded "{\"skill\": \"${1}\" }"
+    python3 -m mycroft.messagebus.send msm.remove.succeeded "{\"skill\": \"${1}\" }"
 }
 function send_remove_fail () {
-    python -m mycroft.messagebus.send msm.remove.failed "{\"skill\": \"${1}\", \"error\" : ${2} }"
+    python3 -m mycroft.messagebus.send msm.remove.failed "{\"skill\": \"${1}\", \"error\" : ${2} }"
 }
 function send_end_install () {
     if [[ "${install_started}" == "true" ]] ; then
-        python -m mycroft.messagebus.send msm.installed
+        python3 -m mycroft.messagebus.send msm.installed
     fi
 }
 function send_end_update () {
     if [[ "${update_started}" == "true" ]] ; then
-        python -m mycroft.messagebus.send msm.updated
+        python3 -m mycroft.messagebus.send msm.updated
     fi
 }
 function send_end_remove () {
     if [[ "${remove_started}" == "true" ]] ; then
-        python -m mycroft.messagebus.send msm.removed
+        python3 -m mycroft.messagebus.send msm.removed
     fi
 }