Skip to content

Instantly share code, notes, and snippets.

@PeterS242
Created April 25, 2016 15:28
Show Gist options
  • Save PeterS242/8266e8365712b09478724392bb092729 to your computer and use it in GitHub Desktop.
Save PeterS242/8266e8365712b09478724392bb092729 to your computer and use it in GitHub Desktop.
[root@swlx17 salt]# rpm -qf /usr/lib/python2.6/site-packages/salt/utils/thin.py
salt-2015.8.8-2.el6.noarch
[root@swlx17 salt]# cp /usr/lib/python2.6/site-packages/salt/utils/thin.py /usr/lib/python2.6/site-packages/salt/utils/thin.py.OLD
[root@swlx17 salt]# cp /usr/lib/python2.6/site-packages/salt/utils/thin.py /usr/lib/python2.6/site-packages/salt/utils/thin.py.NEW
[root@swlx17 salt]# sed -i 's#HAS_XML = True#HAS_XML = False#' $(python2.6 -c "import salt; print salt.__path__[0];")/utils/thin.py.NEW
[root@swlx17 salt]# diff -u /usr/lib/python2.6/site-packages/salt/utils/thin.py.OLD /usr/lib/python2.6/site-packages/salt/utils/thin.py.NEW
--- /usr/lib/python2.6/site-packages/salt/utils/thin.py.OLD 2016-04-25 10:21:03.435420347 -0500
+++ /usr/lib/python2.6/site-packages/salt/utils/thin.py.NEW 2016-04-25 10:21:18.981426624 -0500
@@ -52,7 +52,7 @@
try:
import xml
- HAS_XML = True
+ HAS_XML = False
except ImportError:
HAS_XML = False
# pylint: enable=import-error,no-name-in-module
[root@swlx17 salt]# cp /usr/lib/python2.6/site-packages/salt/utils/thin.py.NEW /usr/lib/python2.6/site-packages/salt/utils/thin.py
cp: overwrite `/usr/lib/python2.6/site-packages/salt/utils/thin.py'? y
[root@swlx17 salt]# rm /var/cache/salt/master/thin/thin.tgz
rm: remove regular file `/var/cache/salt/master/thin/thin.tgz'? y
[root@swlx17 salt]#
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment