Changeset - e856e728b916
[Not reviewed]
default
0 6 0
Mads Kiilerich - 10 years ago 2015-11-07 13:24:48
madski@unity3d.com
cleanup: fix 'try ... except ...' formatting missed in d69aa464f373

Examples spotted by Jiří Suchan <yed@vanyli.net>.
6 files changed with 7 insertions and 7 deletions:
0 comments (0 inline, 0 general)
kallithea/controllers/changeset.py
Show inline comments
 
@@ -203,13 +203,13 @@ class ChangesetController(BaseRepoContro
 
                rev_ranges = [c.db_repo_scm_instance.get_changeset(revision)]
 

	
 
            c.cs_ranges = list(rev_ranges)
 
            if not c.cs_ranges:
 
                raise RepositoryError('Changeset range returned empty result')
 

	
 
        except(ChangesetDoesNotExistError,), e:
 
        except ChangesetDoesNotExistError:
 
            log.debug(traceback.format_exc())
 
            msg = _('Such revision does not exist for this repository')
 
            h.flash(msg, category='error')
 
            raise HTTPNotFound()
 

	
 
        c.changes = OrderedDict()
kallithea/controllers/files.py
Show inline comments
 
@@ -89,13 +89,13 @@ class FilesController(BaseRepoController
 
                       repo_name=c.repo_name,
 
                       revision=0, f_path='', anchor='edit')
 
            add_new = h.link_to(_('Click here to add new file'), url_, class_="alert-link")
 
            h.flash(h.literal(_('There are no files yet. %s') % add_new),
 
                    category='warning')
 
            raise HTTPNotFound()
 
        except(ChangesetDoesNotExistError, LookupError), e:
 
        except (ChangesetDoesNotExistError, LookupError):
 
            msg = _('Such revision does not exist for this repository')
 
            h.flash(msg, category='error')
 
            raise HTTPNotFound()
 
        except RepositoryError as e:
 
            h.flash(safe_str(e), category='error')
 
            raise HTTPNotFound()
 
@@ -109,13 +109,13 @@ class FilesController(BaseRepoController
 
        """
 

	
 
        try:
 
            file_node = cs.get_node(path)
 
            if file_node.is_dir():
 
                raise RepositoryError('given path is a directory')
 
        except(ChangesetDoesNotExistError,), e:
 
        except ChangesetDoesNotExistError:
 
            msg = _('Such revision does not exist for this repository')
 
            h.flash(msg, category='error')
 
            raise HTTPNotFound()
 
        except RepositoryError as e:
 
            h.flash(safe_str(e), category='error')
 
            raise HTTPNotFound()
kallithea/controllers/search.py
Show inline comments
 
@@ -136,12 +136,12 @@ class SearchController(BaseRepoControlle
 
                searcher.close()
 
            except (EmptyIndexError, IOError):
 
                log.error(traceback.format_exc())
 
                log.error('Empty Index data')
 
                c.runtime = _('There is no index to search in. '
 
                              'Please run whoosh indexer')
 
            except (Exception):
 
            except Exception:
 
                log.error(traceback.format_exc())
 
                c.runtime = _('An error occurred during search operation.')
 

	
 
        # Return a rendered template
 
        return render('/search/search.html')
kallithea/lib/auth_modules/auth_ldap.py
Show inline comments
 
@@ -353,12 +353,12 @@ class KallitheaAuthPlugin(auth_modules.K
 
            log.info('user %s authenticated correctly', user_data['username'])
 
            return user_data
 

	
 
        except (LdapUsernameError, LdapPasswordError, LdapImportError):
 
            log.error(traceback.format_exc())
 
            return None
 
        except (Exception,):
 
        except Exception:
 
            log.error(traceback.format_exc())
 
            return None
 

	
 
    def get_managed_fields(self):
 
        return ['username', 'firstname', 'lastname', 'email', 'password']
kallithea/lib/dbmigrate/migrate/versioning/schema.py
Show inline comments
 
@@ -64,13 +64,13 @@ class ControlledSchema(object):
 
                self.table.drop()
 
            except sa_exceptions.DatabaseError:
 
                raise exceptions.DatabaseNotControlledError(str(self.table))
 
        else:
 
            try:
 
                self.table.drop()
 
            except (sa_exceptions.SQLError):
 
            except sa_exceptions.SQLError:
 
                raise exceptions.DatabaseNotControlledError(str(self.table))
 

	
 
    def changeset(self, version=None):
 
        """API to Changeset creation.
 

	
 
        Uses self.version for start version and engine.name
kallithea/lib/dbmigrate/versions/001_initial_release.py
Show inline comments
 
@@ -74,13 +74,13 @@ class User(Base):
 
        try:
 
            session = Session.object_session(self)
 
            self.last_login = datetime.datetime.now()
 
            session.add(self)
 
            session.commit()
 
            log.debug('updated user %s lastlogin', self.username)
 
        except (DatabaseError,):
 
        except DatabaseError:
 
            session.rollback()
 

	
 

	
 
class UserLog(Base):
 
    __tablename__ = 'user_logs'
 
    __table_args__ = {'useexisting':True}
0 comments (0 inline, 0 general)