ReviewBot: add missing yaml import for loading config file.

This commit is contained in:
Ondřej Súkup 2017-06-23 15:29:31 +02:00
parent d4f206b4c6
commit 518b52060b
No known key found for this signature in database
GPG Key ID: 18E6D11A219AF3B7

View File

@ -30,6 +30,7 @@ from osclib.comments import CommentAPI
from osclib.memoize import memoize
import signal
import datetime
import yaml
try:
from xml.etree import cElementTree as ET
@ -88,9 +89,8 @@ class ReviewBot(object):
def load_config(self, filename = None):
if filename:
fh = open(filename, 'r')
with open(filename, 'r') as fh:
self.config = self._load_config(fh)
close(fh)
else:
self.config = self._load_config()