Adding some consistency and fixing some bugs
[gc-dialer] / dialcentral / alarm_notify.py
index 548fd47..084127c 100755 (executable)
@@ -170,7 +170,7 @@ def notify_on_change():
                logging.info("No Change")
 
 
                logging.info("No Change")
 
 
-if __name__ == "__main__":
+def run():
        notifierPath = os.path.join(CACHE_PATH, "notifier.log")
 
        logFormat = '(%(relativeCreated)5d) %(levelname)-5s %(threadName)s.%(name)s.%(funcName)s: %(message)s'
        notifierPath = os.path.join(CACHE_PATH, "notifier.log")
 
        logFormat = '(%(relativeCreated)5d) %(levelname)-5s %(threadName)s.%(name)s.%(funcName)s: %(message)s'
@@ -188,3 +188,7 @@ if __name__ == "__main__":
        except:
                logging.exception("Error")
                raise
        except:
                logging.exception("Error")
                raise
+
+
+if __name__ == "__main__":
+       run()