Mercurial > kallithea
changeset 3563:8d8c4dddd174 beta
fixed bad raise statement
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Sun, 24 Mar 2013 02:51:18 +0100 |
parents | b2728f47b589 |
children | 82b2d1a21ae3 |
files | rhodecode/controllers/files.py |
diffstat | 1 files changed, 5 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/rhodecode/controllers/files.py Fri Mar 22 01:34:14 2013 +0100 +++ b/rhodecode/controllers/files.py Sun Mar 24 02:51:18 2013 +0100 @@ -525,7 +525,8 @@ try: node1 = c.changeset_1.get_node(f_path) if node1.is_dir(): - raise NodeError('%s path is a %s not a file' % (node1, type(node1))) + raise NodeError('%s path is a %s not a file' + % (node1, type(node1))) except NodeDoesNotExistError: c.changeset_1 = EmptyChangeset(cs=diff1, revision=c.changeset_1.revision, @@ -539,7 +540,9 @@ c.changeset_2 = c.rhodecode_repo.get_changeset(diff2) try: node2 = c.changeset_2.get_node(f_path) - raise NodeError('%s path is a %s not a file' % (node2, type(node2))) + if node2.is_dir(): + raise NodeError('%s path is a %s not a file' + % (node2, type(node2))) except NodeDoesNotExistError: c.changeset_2 = EmptyChangeset(cs=diff2, revision=c.changeset_2.revision,