# HG changeset patch # User Marcin Kuzminski # Date 2012-11-27 21:53:06 # Node ID 789f206835596b4ef1b6e79d904670cf9c9d2432 # Parent 31f98c85062333fd37e763095ba9f73e7a2451db fix error when diff path is a directory, edge case generated by google bots diff --git a/rhodecode/controllers/files.py b/rhodecode/controllers/files.py --- a/rhodecode/controllers/files.py +++ b/rhodecode/controllers/files.py @@ -46,7 +46,7 @@ from rhodecode.lib.vcs.conf import setti from rhodecode.lib.vcs.exceptions import RepositoryError, \ ChangesetDoesNotExistError, EmptyRepositoryError, \ ImproperArchiveTypeError, VCSError, NodeAlreadyExistsError,\ - NodeDoesNotExistError, ChangesetError + NodeDoesNotExistError, ChangesetError, NodeError from rhodecode.lib.vcs.nodes import FileNode from rhodecode.model.repo import RepoModel @@ -495,7 +495,7 @@ class FilesController(BaseRepoController else: c.changeset_2 = EmptyChangeset(repo=c.rhodecode_repo) node2 = FileNode(f_path, '', changeset=c.changeset_2) - except RepositoryError: + except (RepositoryError, NodeError): log.error(traceback.format_exc()) return redirect(url('files_home', repo_name=c.repo_name, f_path=f_path))