Skip to content

Commit

Permalink
Adjust migration script to not add trailing whitespaces
Browse files Browse the repository at this point in the history
... for whatever reason since it's not going to be used again anyway.
  • Loading branch information
FichteFoll committed Aug 12, 2013
1 parent b4a8cd5 commit 73f4ce7
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions utils/migrator.py
Original file line number Diff line number Diff line change
Expand Up @@ -732,6 +732,10 @@
repositories.append(repository)


def dump(data, f):
json.dump(data, f, indent="\t", separators=(',', ': '))


includes = []

if not os.path.exists(new_repository_subfolder_path):
Expand All @@ -750,17 +754,17 @@
('packages', [])
])
data['packages'] = sorted_packages
json.dump(data, f, indent="\t")
dump(data, f)

with open(new_channel_path, 'w', encoding='utf-8') as f:
data = OrderedDict()
data['schema_version'] = '2.0'
data['repositories'] = repositories
json.dump(data, f, indent="\t")
dump(data, f)

with open(new_repository_path, 'w', encoding='utf-8') as f:
data = OrderedDict()
data['schema_version'] = '2.0'
data['packages'] = []
data['includes'] = sorted(includes)
json.dump(data, f, indent="\t")
dump(data, f)

0 comments on commit 73f4ce7

Please sign in to comment.