def get_value(self, report, row):
        val = self.mapfunc(report, self.key, row)
        if self.format is not None:
            val = self.format % val
        elif val is None:
            val = ""

        if type(val) != str:
            try:
                val = val.encode('utf-8')
            except __HOLE__:
                val = str(val)

        if self.truncate and len(val) > self.truncate:
            val = val[0:self.truncate] + "..."

        return val
dataset/ETHPy150Open berrange/gerrymander/gerrymander/reports.py/ReportOutputColumn.get_value