X-Git-Url: https://projects.mako.cc/source/mw/blobdiff_plain/af5f9b43d968a775d0dd1ce6f1edc7bda0f799eb..d5e0d569024805e42039955f2e38024fcfdb0f7b:/src/mw/clicommands.py?ds=sidebyside diff --git a/src/mw/clicommands.py b/src/mw/clicommands.py index 4ecafb0..6db3cb8 100644 --- a/src/mw/clicommands.py +++ b/src/mw/clicommands.py @@ -232,7 +232,7 @@ class CommitCommand(CommandBase): filename = os.path.join(self.metadir.root, file) text = codecs.open(filename, 'r', 'utf-8').read() text = text.encode('utf-8') - if text[-1] == '\n': + if (len(text) != 0) and (text[-1] == '\n'): text = text[:-1] md5 = hashlib.md5() md5.update(text)