Le texte retourné quand on édite peut être vide.
* Par exemple, si le fichier n'est pas chiffré pour ma clef.
This commit is contained in:
parent
58b5bf90a2
commit
e8ea0074e9
1 changed files with 19 additions and 19 deletions
|
@ -573,7 +573,7 @@ def editor(texte, annotations=u""):
|
|||
if annotations:
|
||||
annotations = "# " + annotations.replace("\n", "\n# ")
|
||||
# Usually, there is already an ending newline in a text document
|
||||
if texte[-1] != '\n':
|
||||
if texte and texte[-1] != '\n':
|
||||
annotations = '\n' + annotations
|
||||
else:
|
||||
annotations += '\n'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue