ReviewBot: add missing yaml import for loading config file.
This commit is contained in:
parent
d4f206b4c6
commit
518b52060b
@ -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()
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user