# HG changeset patch # User Marcin Kuzminski # Date 2011-04-08 13:12:10 # Node ID 8748f7974ba8fa6803193b60e6496d2826ae6cfd # Parent e76833cd555a2e2e6faf75de91c829454d8aaac9 change the way of detection of corrupted repos. sqlalchemy objects needs to be checkec `is None`. diff --git a/rhodecode/model/scm.py b/rhodecode/model/scm.py --- a/rhodecode/model/scm.py +++ b/rhodecode/model/scm.py @@ -139,7 +139,7 @@ class ScmModel(BaseModel): if r_dbr is not None: repo, dbrepo = r_dbr - if not repo and dbrepo: + if repo is None and dbrepo is None: log.error('Repository %s looks somehow corrupted', r_name) continue last_change = repo.last_change