diff options
author | Wing924 <weihe924stephen@gmail.com> | 2017-07-27 18:57:23 +0900 |
---|---|---|
committer | Wing924 <weihe924stephen@gmail.com> | 2017-07-27 18:57:23 +0900 |
commit | 1c6bdc9d3b6ae27596a251b23338114bf474459c (patch) | |
tree | f5a3d9194415612bb1b0e4aa4d512ed7ae704c1d /python.d | |
parent | 6f58e638cbc019fa44554a77f0926f0059be4f31 (diff) |
add warn message
Diffstat (limited to 'python.d')
-rw-r--r-- | python.d/tomcat.chart.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/python.d/tomcat.chart.py b/python.d/tomcat.chart.py index bcbead5227..05547236a1 100644 --- a/python.d/tomcat.chart.py +++ b/python.d/tomcat.chart.py @@ -87,7 +87,12 @@ class Service(UrlService): data = None raw_data = self._get_raw_data() if raw_data: - xml = ET.fromstring(raw_data) + xml = None + try: + xml = ET.fromstring(raw_data) + except ET.ParseError: + self.debug('%s is not a vaild XML page. Please add "?XML=true" to tomcat status page.' % self.url) + return None data = {} jvm = xml.find('jvm') |