Show More
@@ -79,7 +79,7 b' class RhodecodeAPI():' | |||
|
79 | 79 | if uid != response["id"]: |
|
80 | 80 | raise InvalidResponseIDError("UUID does not match.") |
|
81 | 81 | |
|
82 |
if response["error"] |
|
|
82 | if response["error"] is not None: | |
|
83 | 83 | raise RhodecodeResponseError(response["error"]) |
|
84 | 84 | |
|
85 | 85 | return response["result"] |
@@ -234,7 +234,7 b' class ChangesetController(BaseRepoContro' | |||
|
234 | 234 | # show comments from them |
|
235 | 235 | |
|
236 | 236 | prs = set([x.pull_request for x in |
|
237 |
filter(lambda x: x.pull_request |
|
|
237 | filter(lambda x: x.pull_request is not None, st)]) | |
|
238 | 238 | |
|
239 | 239 | for pr in prs: |
|
240 | 240 | c.comments.extend(pr.comments) |
@@ -514,7 +514,7 b' class DbManage(object):' | |||
|
514 | 514 | ('ldap_attr_login', ''), ('ldap_attr_firstname', ''), |
|
515 | 515 | ('ldap_attr_lastname', ''), ('ldap_attr_email', '')]: |
|
516 | 516 | |
|
517 |
if skip_existing and RhodeCodeSetting.get_by_name(k) |
|
|
517 | if skip_existing and RhodeCodeSetting.get_by_name(k) is not None: | |
|
518 | 518 | log.debug('Skipping option %s' % k) |
|
519 | 519 | continue |
|
520 | 520 | setting = RhodeCodeSetting(k, v) |
@@ -530,7 +530,7 b' class DbManage(object):' | |||
|
530 | 530 | ('default_repo_private', False), |
|
531 | 531 | ('default_repo_type', 'hg')]: |
|
532 | 532 | |
|
533 |
if skip_existing and RhodeCodeSetting.get_by_name(k) |
|
|
533 | if skip_existing and RhodeCodeSetting.get_by_name(k) is not None: | |
|
534 | 534 | log.debug('Skipping option %s' % k) |
|
535 | 535 | continue |
|
536 | 536 | setting = RhodeCodeSetting(k, v) |
@@ -97,7 +97,7 b' def is_git(environ):' | |||
|
97 | 97 | path_info = environ['PATH_INFO'] |
|
98 | 98 | isgit_path = GIT_PROTO_PAT.match(path_info) |
|
99 | 99 | log.debug('pathinfo: %s detected as GIT %s' % ( |
|
100 |
path_info, isgit_path |
|
|
100 | path_info, isgit_path is not None) | |
|
101 | 101 | ) |
|
102 | 102 | return isgit_path |
|
103 | 103 |
@@ -87,7 +87,7 b' class MailBase(object):' | |||
|
87 | 87 | del self.headers[normalize_header(key)] |
|
88 | 88 | |
|
89 | 89 | def __nonzero__(self): |
|
90 |
return self.body |
|
|
90 | return self.body is not None or len(self.headers) > 0 or len(self.parts) > 0 | |
|
91 | 91 | |
|
92 | 92 | def keys(self): |
|
93 | 93 | """Returns the sorted keys.""" |
@@ -388,7 +388,7 b' class MIMEPart(MIMEBase):' | |||
|
388 | 388 | self.set_payload(encoded, charset=charset) |
|
389 | 389 | |
|
390 | 390 | def extract_payload(self, mail): |
|
391 |
if mail.body |
|
|
391 | if mail.body is None: | |
|
392 | 392 | return # only None, '' is still ok |
|
393 | 393 | |
|
394 | 394 | ctype, ctype_params = mail.content_encoding['Content-Type'] |
@@ -368,7 +368,7 b' class SubprocessIOChunker(object):' | |||
|
368 | 368 | # presence of stuff in stderr output) we error out. |
|
369 | 369 | # Else, we are happy. |
|
370 | 370 | _returncode = _p.poll() |
|
371 |
if _returncode or (_returncode |
|
|
371 | if _returncode or (_returncode is None and bg_err.length): | |
|
372 | 372 | try: |
|
373 | 373 | _p.terminate() |
|
374 | 374 | except: |
@@ -252,7 +252,7 b' class TestAdminSettingsController(TestCo' | |||
|
252 | 252 | repo2 = Repository.get_by_repo_name(GIT_REPO) |
|
253 | 253 | self.checkSessionFlash(response, |
|
254 | 254 | 'Marked repo %s as fork of %s' % (repo.repo_name, "Nothing")) |
|
255 |
assert repo.fork |
|
|
255 | assert repo.fork is None | |
|
256 | 256 | |
|
257 | 257 | def test_set_fork_of_same_repo(self): |
|
258 | 258 | self.log_user() |
@@ -60,7 +60,7 b' class TestReposGroups(BaseTestCase):' | |||
|
60 | 60 | gr2 = fixture.create_user_group('tes2') |
|
61 | 61 | Session().commit() |
|
62 | 62 | self.assertRaises(formencode.Invalid, validator.to_python, 'test') |
|
63 |
assert gr.users_group_id |
|
|
63 | assert gr.users_group_id is not None | |
|
64 | 64 | validator = v.ValidUserGroup(edit=True, |
|
65 | 65 | old_data={'users_group_id': |
|
66 | 66 | gr2.users_group_id}) |
General Comments 0
You need to be logged in to leave comments.
Login now