From: Calin Crisan <ccrisan@gmail.com>
Date: Sat, 16 May 2015 20:03:42 +0000 (+0300)
Subject: pytz is not really a requirement
X-Git-Url: http://www.vanbest.org/gitweb/?a=commitdiff_plain;h=529e3abed856353cbed2cc08316290814b3b0555;p=motioneye-debian

pytz is not really a requirement
---

diff --git a/motioneye.py b/motioneye.py
index fa76336..ef752d9 100755
--- a/motioneye.py
+++ b/motioneye.py
@@ -193,13 +193,6 @@ def _test_requirements():
     except ImportError:
         has_pycurl = False
 
-    try:
-        import pytz  # @UnusedImport
-        has_pytz = True
-    
-    except ImportError:
-        has_pytz = False
-
     import mediafiles
     has_ffmpeg = mediafiles.find_ffmpeg() is not None
     
@@ -228,10 +221,6 @@ def _test_requirements():
         print('please install pycurl (python-pycurl)')
         ok = False
     
-    if not has_pytz:
-        print('please install pytz (python-pytz)')
-        ok = False
-    
     if not has_ffmpeg:
         print('please install ffmpeg')
         ok = False
diff --git a/static/js/main.js b/static/js/main.js
index 1db121f..c0a2f74 100644
--- a/static/js/main.js
+++ b/static/js/main.js
@@ -1580,7 +1580,9 @@ function dict2CameraUi(dict) {
     }
 
     if ($('#normalPasswordEntry').val()) { /* anonymous access is disabled */ 
-        snapshotUrl = addAuthParams('GET', snapshotUrl);
+        if (snapshotUrl) {
+            snapshotUrl = addAuthParams('GET', snapshotUrl);
+        }
         if (mjpgUrl) {
             mjpgUrl = addAuthParams('GET', mjpgUrl);
         }