Download:
child 88:376612a41214
parent 86:f303a92328a5
87:ddcd7536f41d
Anton Shestakov <av6@dwimlabs.net>, Sun, 03 Jul 2016 23:00:17 +0800
checker: check before using config['url']

1 файлов изменено, 10 вставок(+), 4 удалений(-) [+]
checker.py file | annotate | diff | comparison | revisions
--- a/checker.py Sat Jul 02 16:08:10 2016 +0800
+++ b/checker.py Sun Jul 03 23:00:17 2016 +0800
@@ -64,16 +64,22 @@
def execute(config):
- ok = True
-
print('# C&O job started: {}'.format(now()))
tmp = mkdtemp(prefix='candolint.')
os.chdir(tmp)
- print('# C&O task: clone')
- print('# C&O project URL: {}'.format(config['url']))
+ ok = True
source = './source'
+ if 'url' not in config:
+ print("# C&O config doesn't have url defined.")
+ print('# C&O job failed')
+ ok = False
+
+ if ok:
+ print('# C&O task: clone')
+ print('# C&O project URL: {}'.format(config['url']))
+
if ok and not run(['hg', 'clone', config['url'], source]):
ok = False