merge from futz2 branch
This commit is contained in:
@@ -76,11 +76,11 @@ follow : whether to tail -f the input"""
|
||||
else:
|
||||
# TODO: out_path should be sanity checked.
|
||||
out_dir = os.path.dirname(self.out_path)
|
||||
if not os.path.isdir(out_dir):
|
||||
if not os.path.isdir(out_dir) and out_dir != '':
|
||||
log.info("Creating directory '%s'" % out_dir)
|
||||
os.makedirs(out_dir)
|
||||
try:
|
||||
self.out_fh = open(self.out_path, 'w')
|
||||
self.out_fh = codecs.open(self.out_path, 'w', 'cp1252')
|
||||
log.debug("out_path %s opened as %s" % (self.out_path, self.out_fh))
|
||||
except:
|
||||
log.error("out_path %s couldn't be opened" % (self.out_path))
|
||||
@@ -215,7 +215,7 @@ which it expects to find at self.re_TailSplitHands -- see for e.g. Everleaf.py.
|
||||
self.obs = self.obs.replace('\r\n', '\n')
|
||||
if self.obs == "" or self.obs == None:
|
||||
log.info("Read no hands.")
|
||||
return
|
||||
return []
|
||||
return re.split(self.re_SplitHands, self.obs)
|
||||
|
||||
def processHand(self, handText):
|
||||
|
||||
Reference in New Issue
Block a user