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
|
from osclib.memoize import memoize
|
||||||
import signal
|
import signal
|
||||||
import datetime
|
import datetime
|
||||||
|
import yaml
|
||||||
|
|
||||||
try:
|
try:
|
||||||
from xml.etree import cElementTree as ET
|
from xml.etree import cElementTree as ET
|
||||||
@ -88,9 +89,8 @@ class ReviewBot(object):
|
|||||||
|
|
||||||
def load_config(self, filename = None):
|
def load_config(self, filename = None):
|
||||||
if filename:
|
if filename:
|
||||||
fh = open(filename, 'r')
|
with open(filename, 'r') as fh:
|
||||||
self.config = self._load_config(fh)
|
self.config = self._load_config(fh)
|
||||||
close(fh)
|
|
||||||
else:
|
else:
|
||||||
self.config = self._load_config()
|
self.config = self._load_config()
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user