comparison frontends/src/jp/cmd_blog.py @ 1923:e28c6c4dffa5

jp (blog): avoid conflict error when command line tags are already present in metadata
author Goffi <goffi@goffi.org>
date Tue, 22 Mar 2016 23:33:31 +0100
parents b111f6589da4
children 70b1a29e1338
comparison
equal deleted inserted replaced
1922:c78c92a0336b 1923:e28c6c4dffa5
234 except KeyError: 234 except KeyError:
235 pass 235 pass
236 # and override metadata with command-line arguments 236 # and override metadata with command-line arguments
237 mb_data['allow_comments'] = C.boolConst(not self.args.no_comment) 237 mb_data['allow_comments'] = C.boolConst(not self.args.no_comment)
238 if self.args.tag: 238 if self.args.tag:
239 data_format.iter2dict('tag', self.args.tag, mb_data) 239 data_format.iter2dict('tag', self.args.tag, mb_data, check_conflict=False)
240 if self.args.title is not None: 240 if self.args.title is not None:
241 mb_data['title'] = self.args.title 241 mb_data['title'] = self.args.title
242 242
243 # then we create the file and write metadata there, as JSON dict 243 # then we create the file and write metadata there, as JSON dict
244 # XXX: if we port jp one day on Windows, O_BINARY may need to be added here 244 # XXX: if we port jp one day on Windows, O_BINARY may need to be added here