Skip to content

Commit

Permalink
better debug
Browse files Browse the repository at this point in the history
  • Loading branch information
vladak authored and Vladimir Kotal committed Jan 22, 2018
1 parent 3fb1864 commit 39512d1
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion tools/sync/mirror.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#

#
# Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
#

"""
Expand Down Expand Up @@ -140,6 +140,8 @@
continue

if pattern.match(args.project):
logger.debug("Project '{}' matched pattern '{}'".
format(args.project, proj))
project_config = projects.get(proj)
break
except KeyError:
Expand All @@ -155,8 +157,13 @@
ignored_repos = []
use_proxy = False
if project_config:
logger.debug("Project '{}' has specific (non-default) config".
format(args.project))

if project_config.get('ignored_repos'):
ignored_repos = project_config.get('ignored_repos')
logger.debug("has ignored repositories: {}".
format(ignored_repos))

hooks = project_config.get('hooks')
if hooks:
Expand Down Expand Up @@ -187,6 +194,11 @@
sys.exit(1)

if project_config.get('proxy'):
if not config.get('proxy'):
logger.error("global project proxy needed")
sys.exit(1)

logger.debug("will use proxy")
use_proxy = True

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

0 comments on commit 39512d1

Please sign in to comment.