Skip to content

Commit 5715b4a

Browse files
committed
YAML transformation: replace tabs with spaces
1 parent e7fcb90 commit 5715b4a

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

scripts/transform.py

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -32,17 +32,17 @@
3232
sg_data['min'] = min_val
3333
sg_data['max'] = max_val
3434

35-
data['project']['stackgroups'] = [sg_data]
35+
data['project']['stackgroups'] = [sg_data]
3636

3737
# Dateiname als "path"
3838
for stack in data['project']['stacks']:
39-
folder = stack['folder']
40-
del stack['folder']
39+
folder = stack['folder']
40+
del stack['folder']
4141

4242
stack_max_val = stack.get('valuelimit')
4343
stack_min_val = 0
4444

45-
stack['title'] = '{} - {}'.format(name, stack['name'])
45+
stack['title'] = u'{} - {}'.format(name, stack['name'])
4646
del stack['name']
4747

4848
if stack_max_val:
@@ -55,16 +55,16 @@
5555
stack['description'] = metadata.strip("'")
5656
del stack['metadata']
5757

58-
stack['stackgroups'] = [{
59-
'title': name,
60-
'relation': 'has_channel'}]
61-
stack['mirrors'] = [{
62-
'title': 'Dresden',
63-
'folder': folder,
64-
'tile_source_type': 9,
65-
'path': os.path.splitext(filename)[0]}]
58+
stack['stackgroups'] = [{
59+
'title': name,
60+
'relation': 'has_channel'}]
61+
stack['mirrors'] = [{
62+
'title': 'Dresden',
63+
'folder': folder,
64+
'tile_source_type': 9,
65+
'path': os.path.splitext(filename)[0]}]
6666

6767

6868

69-
print yaml.dump( data, default_flow_style=False)
69+
print(yaml.safe_dump( data, default_flow_style=False))
7070

0 commit comments

Comments
 (0)