def debug_info(self): if not self.proto.HasField('debug_info'): return '%21s' % '' else: file = util.basename(self.proto.debug_info.file_name) line = self.proto.debug_info.line content = [] content.append('%15s' % file) content.append('+%04d' % line) return ' '.join(content)
def basename(self): return util.basename(self.proto.name)