From 50386d3f70322a10a2f96bc918f992753af550dc Mon Sep 17 00:00:00 2001 From: Hidden Z Date: Tue, 2 Nov 2010 16:09:31 +0000 Subject: [PATCH] py-i2phosts-fetcher: update last_success only after injector's run --- py-i2phosts-fetcher | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/py-i2phosts-fetcher b/py-i2phosts-fetcher index fa66639..b282045 100755 --- a/py-i2phosts-fetcher +++ b/py-i2phosts-fetcher @@ -100,9 +100,6 @@ for source in all_sources: if etag: log.debug('%s ETag: %s', source.name, etag) source.etag = etag - # update last_success - source.last_success = datetime.datetime.now() - source.save() # form commnd-line for invoke injector log.info('adding hosts from: %s', source.name) sp_args = ['py-i2phosts-injector', '-s', '-a', '-f', tmpfile, '-d', @@ -112,3 +109,6 @@ for source in all_sources: out = p.communicate()[0] os.remove(tmpfile) log.info('injector output: \n%s', out) + # update last_success + source.last_success = datetime.datetime.now() + source.save()