This commit is contained in:
Iulian Onofrei 2018-01-09 20:03:32 +00:00 committed by GitHub
commit 9f8f6390a3

View file

@ -4,6 +4,7 @@ from __future__ import unicode_literals
import argparse import argparse
import collections import collections
import functools import functools
import os
from aspy.yaml import ordered_load from aspy.yaml import ordered_load
from identify.identify import ALL_TAGS from identify.identify import ALL_TAGS
@ -153,8 +154,11 @@ def ordered_load_normalize_legacy_config(contents):
data = ordered_load(contents) data = ordered_load(contents)
if isinstance(data, list): if isinstance(data, list):
# TODO: Once happy, issue a deprecation warning and instructions # TODO: Once happy, issue a deprecation warning and instructions
return collections.OrderedDict([('repos', data)]) data = collections.OrderedDict([('repos', data)])
else:
for repo_config in data['repos']:
repo_config['repo'] = os.path.expanduser(repo_config['repo'])
return data return data