summaryrefslogtreecommitdiffstats
path: root/debian/patches/0004-use-system-python-yaml-library.patch
blob: 3786852893b09ab5333c358916354a0c1e2e0825 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
From: Lennart Weller <lhw@ring0.de>
Date: Sat, 28 Jan 2017 18:34:35 +0100
Subject: use system python-yaml library

---
 plugins.d/python.d.plugin | 9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)

diff --git a/plugins.d/python.d.plugin b/plugins.d/python.d.plugin
index 03c156f..af200d0 100755
--- a/plugins.d/python.d.plugin
+++ b/plugins.d/python.d.plugin
@@ -58,15 +58,8 @@ except (AssertionError, ImportError):
         msg.info('Using python v2')
     except ImportError:
         msg.fatal('Cannot start. No importlib.machinery on python3 or lack of imp on python2')
-# try:
-#     import yaml
-# except ImportError:
-#     msg.fatal('Cannot find yaml library')
 try:
-    if PY_VERSION == 3:
-        import pyyaml3 as yaml
-    else:
-        import pyyaml2 as yaml
+    import yaml
 except ImportError:
     msg.fatal('Cannot find yaml library')