]> arthur.barton.de Git - netdata.git/commitdiff
python 2.7 notification in tomcat
authorpaulfantom <paulfantom@gmail.com>
Mon, 25 Jul 2016 08:08:17 +0000 (10:08 +0200)
committerpaulfantom <paulfantom@gmail.com>
Mon, 25 Jul 2016 08:08:17 +0000 (10:08 +0200)
python.d/tomcat.chart.py

index a34b1a35d4810a0dbfc8f776d7f104f5d981ffe3..24e12c6e8106b33fcffc7bea195c9c5a4e8e3267 100644 (file)
@@ -2,6 +2,8 @@
 # Description: tomcat netdata python.d module
 # Author: Pawel Krupa (paulfantom)
 
+# Python version higher than 2.7 is needed to run this module.
+
 from base import UrlService
 import xml.etree.ElementTree as ET  # phone home...
 
@@ -76,5 +78,8 @@ class Service(UrlService):
                     'jvm': memory.attrib['free']}
         except (ValueError, AttributeError):
             return None
+        except SyntaxError as e:
+            self.error("Tomcat module needs python 2.7 at least. Stopping")
+            self.debug(str(e))
         except Exception as e:
             self.debug(str(e))