fix file open mode

This commit is contained in:
Mike McLean 2019-03-02 15:58:49 -05:00
parent 3b86d7f247
commit 01b0a41639
3 changed files with 4 additions and 4 deletions

View file

@ -461,7 +461,7 @@ class BuildRoot(object):
self.logger.info('Rereading %s, inode: %s -> %s, size: %s -> %s' %
(fpath, inode, stat_info.st_ino, size, stat_info.st_size))
fd.close()
fd = open(fpath, 'r')
fd = open(fpath, 'rb')
logs[fname] = (fd, stat_info.st_ino, stat_info.st_size or size, fpath)
except:
self.logger.error("Error reading mock log: %s", fpath)