Download:
child 127:837ecaf010dc
parent 125:751f50b9b5fa
126:76da93a3fe44
Anton Shestakov <av6@dwimlabs.net>, Thu, 07 Jul 2016 14:27:13 +0800
checker: use elif to save on config['scm'] checks

1 файлов изменено, 4 вставок(+), 4 удалений(-) [+]
checker.py file | annotate | diff | comparison | revisions
--- a/checker.py Thu Jul 07 14:24:22 2016 +0800
+++ b/checker.py Thu Jul 07 14:27:13 2016 +0800
@@ -153,7 +153,7 @@
if config['scm'] == 'git':
if not git_clone(config['url'], source):
return False
- if config['scm'] == 'hg':
+ elif config['scm'] == 'hg':
if not hg_clone(config['url'], source):
return False
@@ -163,14 +163,14 @@
if config['scm'] == 'git':
if not git_status():
return False
- if config['scm'] == 'hg':
+ elif config['scm'] == 'hg':
if not hg_summary():
return False
if config['scm'] == 'git':
if not git_show():
return False
- if config['scm'] == 'hg':
+ elif config['scm'] == 'hg':
if not hg_log():
return False
@@ -214,7 +214,7 @@
if config['scm'] == 'git':
files = git_files(linter['include'], linter.get('exclude', []))
- if config['scm'] == 'hg':
+ elif config['scm'] == 'hg':
files = hg_files(linter['include'], linter.get('exclude', []))
if files is False:
return False