Fixed jobs.py pprint_yaml() function.
This commit is contained in:
parent
b9adbae4fd
commit
2747e0cc94
18
src/jobs.py
18
src/jobs.py
@ -1,10 +1,8 @@
|
|||||||
import yaml
|
import yaml
|
||||||
import icalendar
|
import icalendar
|
||||||
|
|
||||||
import pprint
|
import pprint
|
||||||
import sys
|
import sys
|
||||||
from os import listdir, chdir
|
import os
|
||||||
from os.path import isfile, dirname, join
|
|
||||||
|
|
||||||
class MeetingJobs:
|
class MeetingJobs:
|
||||||
"""Executes post, gate, and check jobs."""
|
"""Executes post, gate, and check jobs."""
|
||||||
@ -30,17 +28,11 @@ def pprint_yaml():
|
|||||||
os.chdir('../meetings/')
|
os.chdir('../meetings/')
|
||||||
|
|
||||||
# get a list of all the yaml files
|
# get a list of all the yaml files
|
||||||
yamlfiles = [f for f in os.listdir() if os.path.isfile(f) and ".yaml" in f]
|
meetings = [yaml.load(open(f, 'r')) for f in os.listdir() if os.path.isfile(f) and ".yaml" in f]
|
||||||
|
|
||||||
meeting = []
|
|
||||||
for f in yaml:
|
|
||||||
m = open(f, 'r')
|
|
||||||
|
|
||||||
meeting.append(yaml.load(m))
|
|
||||||
|
|
||||||
# print yaml.load(meeting), used to have sys.out as second before to print to terminal
|
|
||||||
print yaml.dump(yaml.load(m))
|
|
||||||
|
|
||||||
|
for m in meetings:
|
||||||
|
print(yaml.dump(m))
|
||||||
|
|
||||||
# main
|
# main
|
||||||
pprint_yaml()
|
pprint_yaml()
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user