10065.patch
bin/CreoleCat | ||
---|---|---|
59 | 59 | |
60 | 60 |
if opts.output is None: |
61 | 61 |
if opts.source is not None: |
62 |
parser.error("Vous devez spécifier l’option '--output'.") |
|
62 |
opts.output="" |
|
63 |
#parser.error("Vous devez spécifier l’option '--output'.") |
|
63 | 64 |
else: |
64 | 65 |
if opts.template is not None \ |
65 | 66 |
and opts.output == join(cfg.distrib_dir, opts.template): |
creole/template.py | ||
---|---|---|
413 | 413 |
raise TemplateError, msg |
414 | 414 | |
415 | 415 |
# écriture du fichier cible |
416 |
try: |
|
417 |
file_h = file(destfilename, 'w') |
|
418 |
file_h.write(data) |
|
419 |
file_h.close() |
|
420 |
except IOError, e: |
|
421 |
msg = _(u"Unable to write in file '{0}': '{1}'").format(destfilename, e) |
|
422 |
raise FileNotFound, msg |
|
416 |
if destfilename == '': |
|
417 |
# FIXME : hum |
|
418 |
print data |
|
419 |
else: |
|
420 |
try: |
|
421 |
file_h = file(destfilename, 'w') |
|
422 |
file_h.write(data) |
|
423 |
file_h.close() |
|
424 |
except IOError, e: |
|
425 |
msg = _(u"Unable to write in file '{0}': '{1}'").format(destfilename, e) |
|
426 |
raise FileNotFound, msg |
|
423 | 427 | |
424 | 428 |
def change_properties(self, filevar, container=None, force_full_name=False): |
425 | 429 |
chowncmd = [u'chown'] |