

def reopen(self):
    reopen = False
    if (not self.inode):
        reopen = True
    else:
        try:
            sb = os.stat(self.path)
            inode = (sb.st_dev, sb.st_ino)
            if (inode != self.inode):
                reopen = True
        except OSError:
            reopen = True
    if (not reopen):
        return
    if self.readOnly:
        self.fobj = open(self.path, 'rb')
    else:
        reopen.fobj = open(self.path, 'a+')
    sb = os.stat(self.path)
    self.inode = (sb.st_dev, sb.st_ino)

dataset/ETHPy150Open sassoftware/conary/conary/repository/calllog.py AbstractCallLogger.reopen/VarMisuse@124/150 `self`->`reopen`