summaryrefslogtreecommitdiff
path: root/tsp/scripts
diff options
context:
space:
mode:
authorAleksander Mistewicz <a.mistewicz@samsung.com>2016-07-07 14:18:51 +0200
committerAleksander Mistewicz <a.mistewicz@samsung.com>2016-10-07 17:29:30 +0200
commite10887377b8ad0f94804ae35beba3755f52e7976 (patch)
tree01a09ee21c4b33ad519e18489d6dbf2a6ee507ae /tsp/scripts
parentae61b0581ef124e1659b4db827b116aa56afd456 (diff)
downloadmajor-e10887377b8ad0f94804ae35beba3755f52e7976.tar.gz
major-e10887377b8ad0f94804ae35beba3755f52e7976.tar.bz2
major-e10887377b8ad0f94804ae35beba3755f52e7976.zip
Write new timestamp at the end in crawl.py
If a timeout occurs during a crawl an old timestamp will be preserved. Change-Id: Ibae158baa1a8c8fbe09397225b312d29d44e715c Signed-off-by: Aleksander Mistewicz <a.mistewicz@samsung.com>
Diffstat (limited to 'tsp/scripts')
-rwxr-xr-xtsp/scripts/crawler.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/tsp/scripts/crawler.py b/tsp/scripts/crawler.py
index 640c084..4cc1669 100755
--- a/tsp/scripts/crawler.py
+++ b/tsp/scripts/crawler.py
@@ -68,8 +68,6 @@ def get_modified_paths(discovered, timestamp):
else:
return discovered
logging.info("Previous timestamp: %s", stamp)
- with open(timestamp, 'w') as f:
- f.write(str_time)
for url in discovered:
logging.debug("Check for MD5SUMS change: %s", url)
for md5sums_url in [url + 'images/arm-wayland/common-wayland-3parts-armv7l-odroidu3/MD5SUMS',\
@@ -83,6 +81,8 @@ def get_modified_paths(discovered, timestamp):
logging.info("MD5SUMS changed: %s", url)
ret.add(url)
break
+ with open(timestamp, 'w') as f:
+ f.write(str_time)
return ret
def parse_arguments():