Changeset - f0e8d673f2a2
[Not reviewed]
default
0 2 0
Mads Kiilerich - 6 years ago 2019-08-03 23:31:43
mads@kiilerich.com
Grafted from: 73e81977a2c9
flake8: fix F632 use ==/!= to compare str, bytes, and int literals

- even if the values probably would have been interned ...
2 files changed with 3 insertions and 3 deletions:
0 comments (0 inline, 0 general)
kallithea/lib/vcs/utils/helpers.py
Show inline comments
 
@@ -51,7 +51,7 @@ def get_scm(path, search_up=False, expli
 
        raise VCSError('More than one [%s] scm found at given path %s'
 
                       % (', '.join((x[0] for x in found_scms)), path))
 

	
 
    if len(found_scms) is 0:
 
    if len(found_scms) == 0:
 
        raise VCSError('No scm found at given path %s' % path)
 

	
 
    return found_scms[0]
kallithea/model/validators.py
Show inline comments
 
@@ -583,11 +583,11 @@ def ValidPerms(type_='repo'):
 
            # update permissions
 
            for k, v, t in perms_new:
 
                try:
 
                    if t is 'user':
 
                    if t == 'user':
 
                        self.user_db = User.query() \
 
                            .filter(User.active == True) \
 
                            .filter(User.username == k).one()
 
                    if t is 'users_group':
 
                    if t == 'users_group':
 
                        self.user_db = UserGroup.query() \
 
                            .filter(UserGroup.users_group_active == True) \
 
                            .filter(UserGroup.users_group_name == k).one()
0 comments (0 inline, 0 general)