def refreshLog(self):
        '''Check for new available data, read it, and scroll to the bottom.'''
        data = self.fileHandle.availableData()
        if data.length():
            utf8string = NSString.alloc().initWithData_encoding_(
                data, NSUTF8StringEncoding)
            for line in utf8string.splitlines(True):
                if line.endswith(u"\n"):
                    self.logFileData.addLine_partial_(line.rstrip(u"\n"), False)
                else:
                    self.logFileData.addLine_partial_(line, True)
            self.logView.reloadData()
            self.logView.scrollRowToVisible_(1 - self.logFileData.lineCount())
dataset/ETHPy150Open munki/munki/code/apps/Managed Software Center/Managed Software Center/MSCLogWindowController.py/MSCLogWindowController.refreshLog/swapped operands of `-`