def _unwrap(self, log): from buildbot.process import buildstep if isinstance(log, buildstep.SyncLogFileWrapper): return log.unwrap() return log