diff options
author | Aleksander Mistewicz <a.mistewicz@samsung.com> | 2016-07-07 14:18:51 +0200 |
---|---|---|
committer | Aleksander Mistewicz <a.mistewicz@samsung.com> | 2016-10-07 17:29:30 +0200 |
commit | e10887377b8ad0f94804ae35beba3755f52e7976 (patch) | |
tree | 01a09ee21c4b33ad519e18489d6dbf2a6ee507ae /tsp/scripts | |
parent | ae61b0581ef124e1659b4db827b116aa56afd456 (diff) | |
download | major-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-x | tsp/scripts/crawler.py | 4 |
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(): |