diff --git a/bin/CreoleCat b/bin/CreoleCat index b956d5c..b0f51b1 100755 --- a/bin/CreoleCat +++ b/bin/CreoleCat @@ -59,7 +59,8 @@ def parse_cmdline(): if opts.output is None: if opts.source is not None: - parser.error("Vous devez spécifier l’option '--output'.") + opts.output="" + #parser.error("Vous devez spécifier l’option '--output'.") else: if opts.template is not None \ and opts.output == join(cfg.distrib_dir, opts.template): diff --git a/creole/template.py b/creole/template.py index 513b2a7..576c2eb 100644 --- a/creole/template.py +++ b/creole/template.py @@ -413,13 +413,17 @@ class CreoleTemplateEngine(object): raise TemplateError, msg # écriture du fichier cible - try: - file_h = file(destfilename, 'w') - file_h.write(data) - file_h.close() - except IOError, e: - msg = _(u"Unable to write in file '{0}': '{1}'").format(destfilename, e) - raise FileNotFound, msg + if destfilename == '': + # FIXME : hum + print data + else: + try: + file_h = file(destfilename, 'w') + file_h.write(data) + file_h.close() + except IOError, e: + msg = _(u"Unable to write in file '{0}': '{1}'").format(destfilename, e) + raise FileNotFound, msg def change_properties(self, filevar, container=None, force_full_name=False): chowncmd = [u'chown']