Skip to content

Commit da7d984

Browse files
author
Vladimir Kotal
committed
make sure ignored_repos are initialized even for no project config
1 parent 551221e commit da7d984

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

tools/sync/mirror.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,7 @@
172172
prehook = None
173173
posthook = None
174174
use_proxy = False
175+
ignored_repos = None
175176
if project_config:
176177
logger.debug("Project '{}' has specific (non-default) config".
177178
format(args.project))
@@ -212,8 +213,6 @@
212213
sys.exit(1)
213214
logger.debug("has ignored repositories: {}".
214215
format(ignored_repos))
215-
else:
216-
ignored_repos = []
217216

218217
hooks = project_config.get('hooks')
219218
if hooks:
@@ -252,6 +251,9 @@
252251
logger.debug("will use proxy")
253252
use_proxy = True
254253

254+
if not ignored_repos:
255+
ignored_repos = []
256+
255257
# Log messages to dedicated log file if running in batch mode.
256258
if args.batch:
257259
if not logdir:

0 commit comments

Comments
 (0)