Gentoo Archives: gentoo-commits

From: Brian Dolbec <brian.dolbec@×××××.com>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/layman:master commit in: layman/
Date: Sun, 01 May 2011 00:53:42
Message-Id: fa6bee894b2259941b2ca233fee1c07fed487d73.dol-sen@gentoo
1 commit: fa6bee894b2259941b2ca233fee1c07fed487d73
2 Author: dol-sen <brian.dolbec <AT> gmail <DOT> com>
3 AuthorDate: Sun May 1 00:53:35 2011 +0000
4 Commit: Brian Dolbec <brian.dolbec <AT> gmail <DOT> com>
5 CommitDate: Sun May 1 00:53:35 2011 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/layman.git;a=commit;h=fa6bee89
7
8 Add the timestamp and url to the RemoteDB.cache() outputs.
9
10 ---
11 layman/db.py | 5 +++--
12 1 files changed, 3 insertions(+), 2 deletions(-)
13
14 diff --git a/layman/db.py b/layman/db.py
15 index 3498223..6f79e26 100644
16 --- a/layman/db.py
17 +++ b/layman/db.py
18 @@ -300,8 +300,8 @@ class RemoteDB(DbBase):
19
20 if os.path.exists(tpath):
21 with open(tpath,'r') as previous:
22 - last_time = previous.read()
23 - request.add_header('If-Modified-Since', last_time)
24 + timestamp = previous.read()
25 + request.add_header('If-Modified-Since', timestamp)
26
27 if not self.check_path([mpath]):
28 continue
29 @@ -313,6 +313,7 @@ class RemoteDB(DbBase):
30 if e.getcode() == 304:
31 self.output.info('Remote list already up to date: %s'
32 % url)
33 + self.output.info('Last-modified: %s' % timestamp)
34 else:
35 self.output.info('RemoteDB.cache(); HTTPError was:\n %s'
36 % str(e))