python 2.7 notification in tomcat
paulfantom committed
Jul 25, 2016 at 10:08 UTC
6d99813b8fbfb95f6b511240156a1ca6400cda3e
1 file changed
+5
python.d/tomcat.chart.py
+5
@@ -2,6 +2,8 @@
2
# Description: tomcat netdata python.d module
3
# Author: Pawel Krupa (paulfantom)
4
5
+# Python version higher than 2.7 is needed to run this module.
6
+
7
from base import UrlService
8
import xml.etree.ElementTree as ET # phone home...
9
@@ -76,5 +78,8 @@ class Service(UrlService):
78
'jvm': memory.attrib['free']}
79
except (ValueError, AttributeError):
80
return None
81
+ except SyntaxError as e:
82
+ self.error("Tomcat module needs python 2.7 at least. Stopping")
83
+ self.debug(str(e))
84
except Exception as e:
85
self.debug(str(e))