changeset 4744:6678b977f859

db: just fail badly if a repo can't be loaded (probably missing in file systems) The error condition could perhaps be reported to the user in a better way, but propagating the VCS error seems like a better approximation of that than just logging it and failing silent.
author Mads Kiilerich <madski@unity3d.com>
date Tue, 06 Jan 2015 00:54:36 +0100
parents 3e5476843a19
children 4363158fb68e
files kallithea/model/db.py
diffstat 1 files changed, 5 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/kallithea/model/db.py	Tue Jan 06 00:54:36 2015 +0100
+++ b/kallithea/model/db.py	Tue Jan 06 00:54:36 2015 +0100
@@ -1434,17 +1434,11 @@
 
     def __get_instance(self):
         repo_full_path = self.repo_full_path
-        try:
-            alias = get_scm(repo_full_path)[0]
-            log.debug('Creating instance of %s repository from %s'
-                      % (alias, repo_full_path))
-            backend = get_backend(alias)
-        except VCSError:
-            log.error(traceback.format_exc())
-            log.error('Perhaps this repository is in db and not in '
-                      'filesystem run rescan repositories with '
-                      '"destroy old data " option from admin panel')
-            return
+
+        alias = get_scm(repo_full_path)[0]
+        log.debug('Creating instance of %s repository from %s'
+                  % (alias, repo_full_path))
+        backend = get_backend(alias)
 
         if alias == 'hg':
             repo = backend(safe_str(repo_full_path), create=False,