Skip to content

Commit 39512d1

Browse files
vladakVladimir Kotal
authored andcommitted
better debug
1 parent 3fb1864 commit 39512d1

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

tools/sync/mirror.py

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
#
2020

2121
#
22-
# Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
22+
# Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
2323
#
2424

2525
"""
@@ -140,6 +140,8 @@
140140
continue
141141

142142
if pattern.match(args.project):
143+
logger.debug("Project '{}' matched pattern '{}'".
144+
format(args.project, proj))
143145
project_config = projects.get(proj)
144146
break
145147
except KeyError:
@@ -155,8 +157,13 @@
155157
ignored_repos = []
156158
use_proxy = False
157159
if project_config:
160+
logger.debug("Project '{}' has specific (non-default) config".
161+
format(args.project))
162+
158163
if project_config.get('ignored_repos'):
159164
ignored_repos = project_config.get('ignored_repos')
165+
logger.debug("has ignored repositories: {}".
166+
format(ignored_repos))
160167

161168
hooks = project_config.get('hooks')
162169
if hooks:
@@ -187,6 +194,11 @@
187194
sys.exit(1)
188195

189196
if project_config.get('proxy'):
197+
if not config.get('proxy'):
198+
logger.error("global project proxy needed")
199+
sys.exit(1)
200+
201+
logger.debug("will use proxy")
190202
use_proxy = True
191203

192204
# Log messages to dedicated log file if running in batch mode.

0 commit comments

Comments
 (0)