]> www.vanbest.org Git - motioneye-debian/commitdiff
import main modules after loading the settings
authorCalin Crisan <ccrisan@gmail.com>
Sun, 27 Sep 2015 13:00:27 +0000 (16:00 +0300)
committerCalin Crisan <ccrisan@gmail.com>
Sun, 27 Sep 2015 13:00:27 +0000 (16:00 +0300)
motioneye/meyectl.py

index 9bb465b2877fdc8707c5ff0cf48275766a228fce..af51366528c9e007b8b009a0ce38022a939ec71a 100755 (executable)
@@ -27,11 +27,7 @@ from tornado.httpclient import AsyncHTTPClient
 # make sure motioneye is on python path
 sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
 
-import relayevent
-import sendmail
-import server
 import settings
-import webhook
 
 
 _LOG_FILE = 'motioneye.log'
@@ -247,6 +243,11 @@ def main():
     command = sys.argv[1]
     arg_parser = make_arg_parser(command)
 
+    import relayevent
+    import sendmail
+    import server
+    import webhook
+
     if command in ('startserver', 'stopserver'):
         server.main(arg_parser, sys.argv[2:], command[:-6])