]> www.vanbest.org Git - motioneye-debian/commitdiff
added update caching prevention
authorCalin Crisan <ccrisan@gmail.com>
Sun, 27 Oct 2013 13:58:01 +0000 (15:58 +0200)
committerCalin Crisan <ccrisan@gmail.com>
Sun, 27 Oct 2013 13:58:01 +0000 (15:58 +0200)
src/update.py

index c4f2e2d39160bbaff8b1863dadeaa1e97bd960c1..9d74aa97acdcf8cbd0e0c9b3a99b399d7d208b0a 100644 (file)
@@ -20,6 +20,7 @@ import logging
 import os.path
 import shutil
 import tempfile
+import time
 import urllib2
 
 import settings
@@ -46,6 +47,8 @@ def get_all_versions():
             'owner': settings.REPO[0],
             'repo': settings.REPO[1]}
     
+    url += '?_=' + str(int(time.time())) # prevents caching
+    
     try:
         logging.debug('fetching %(url)s...' % {'url': url})
         
@@ -100,6 +103,8 @@ def download(version):
             'repo': settings.REPO[1],
             'version': version}
     
+    url += '?_=' + str(int(time.time())) # prevents caching
+    
     try:
         logging.debug('downloading %(url)s...' % {'url': url})