Mercurial > hg > decoupage
comparison decoupage/formats.py @ 52:a2f09d749a3f
work towards refactor letting links (and maybe other things in the future) dwell in a decoupage namespace
author | Jeff Hammel <jhammel@mozilla.com> |
---|---|
date | Tue, 16 Nov 2010 21:14:25 -0800 |
parents | ac693b8df32c |
children | 47acf12d01e1 |
comparison
equal
deleted
inserted
replaced
51:8002dcdb8e82 | 52:a2f09d749a3f |
---|---|
5 | 5 |
6 def format_json(data): | 6 def format_json(data): |
7 | 7 |
8 # fix datetime | 8 # fix datetime |
9 for f in data['files']: | 9 for f in data['files']: |
10 f['modified'] = f['modified'].ctime() | 10 if 'modified' in f: |
11 f['modified'] = f['modified'].ctime() | |
11 | 12 |
12 return 'application/json', json.dumps(data['files']) | 13 return 'application/json', json.dumps(data['files']) |
13 | 14 |