@cryptotaxi247 / netdata-1 / commits / 0eeb6b814

error messages

paulfantom committed Jul 1, 2016 at 13:40 UTC 0eeb6b81432fa037e98e0d17d853136f761d4716
1 file changed +4 -6
python.d/python_modules/base.py
+4 -6
@@ -453,16 +453,14 @@ class LogService(SimpleService):
453 return None
454
455 def check(self):
456 - if self.name is None or self.name == str(None):
457 - self.error("Log service doesn't have name.")
458 - return False
456 + if self.name is not None or self.name != str(None):
457 + self.name = ""
458 else:
459 self.name = str(self.name)
460 try:
461 self.log_path = str(self.configuration['path'])
462 except (KeyError, TypeError):
464 - self.error("Malformed path to log: '" + self.log_path + "'")
465 - return False
463 + self.error("No path to log specified. Using: '" + self.log_path + "'")
464
465 # FIXME Remove preventing of frequent log parsing
466 if self.update_every < 3:
@@ -471,5 +469,5 @@ class LogService(SimpleService):
469 if os.access(self.log_path, os.R_OK):
470 return True
471 else:
474 - self.error("Cannot access file. No read permission.")
472 + self.error("Cannot access file: '" + self.log_path + "'")
473 return False