Mercurial > piecrust2
comparison piecrust/baking/records.py @ 753:9a92e2804562
bake: Add the list of deleted files to the bake/processing records.
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Sat, 25 Jun 2016 16:58:59 -0700 |
parents | 234d0c7c02cf |
children |
comparison
equal
deleted
inserted
replaced
752:7dbddfed8129 | 753:9a92e2804562 |
---|---|
14 key += '+%s' % extra_key | 14 key += '+%s' % extra_key |
15 return hashlib.md5(key.encode('utf8')).hexdigest() | 15 return hashlib.md5(key.encode('utf8')).hexdigest() |
16 | 16 |
17 | 17 |
18 class BakeRecord(Record): | 18 class BakeRecord(Record): |
19 RECORD_VERSION = 19 | 19 RECORD_VERSION = 20 |
20 | 20 |
21 def __init__(self): | 21 def __init__(self): |
22 super(BakeRecord, self).__init__() | 22 super(BakeRecord, self).__init__() |
23 self.out_dir = None | 23 self.out_dir = None |
24 self.bake_time = None | 24 self.bake_time = None |
25 self.baked_count = {} | 25 self.baked_count = {} |
26 self.total_baked_count = {} | 26 self.total_baked_count = {} |
27 self.deleted = [] | |
27 self.success = True | 28 self.success = True |
28 | 29 |
29 | 30 |
30 class SubPageBakeInfo(object): | 31 class SubPageBakeInfo(object): |
31 FLAG_NONE = 0 | 32 FLAG_NONE = 0 |
103 | 104 |
104 @property | 105 @property |
105 def all_assets(self): | 106 def all_assets(self): |
106 for sub in self.subs: | 107 for sub in self.subs: |
107 yield from sub.assets | 108 yield from sub.assets |
109 | |
110 @property | |
111 def all_out_paths(self): | |
112 for sub in self.subs: | |
113 yield sub.out_path | |
108 | 114 |
109 @property | 115 @property |
110 def has_any_error(self): | 116 def has_any_error(self): |
111 if len(self.errors) > 0: | 117 if len(self.errors) > 0: |
112 return True | 118 return True |