Skip to content

Commit

Permalink
semonitor: properly initialize eof (#79)
Browse files Browse the repository at this point in the history
In commit a78d311 ("Clean up message logic and eof handling")
the eof character was being checked in readData. When master mode
however, this led to an unbound eof variable as loop condiational.

Fixes #78

Signed-off-by: Olliver Schinagl <oliver@schinagl.nl>
  • Loading branch information
oliv3r authored and jbuehl committed Jan 28, 2018
1 parent b34ec6a commit d458de3
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions semonitor.py
Expand Up @@ -41,6 +41,7 @@ def terminate(code=0, msg=""):

# process the input data
def readData(args, mode, dataFile, recFile, outFile, keyStr):
eof = False
updateBuf = list('\x00' * UPDATE_SIZE) if args.updatefile else []
if mode.passiveMode:
# skip data until the start of the first complete message
Expand Down

0 comments on commit d458de3

Please sign in to comment.