def _ensureOldClass(cls):
    if not type(cls) is types.ClassType:
        from twisted.python.reflect import fullyQualifiedName

        raise ValueError(
            ("twisted.python._oldstyle._oldStyle is being used to decorate a "
             "new-style class ({cls}). This should only be used to "
             "decorate old-style classes.").format(
                 cls=fullyQualifiedName(cls)))

    return cls
Implementation of Reporter callback.
dataset/ETHPy150Open twisted/twisted/twisted/python/_oldstyle.py/_ensureOldClass--crossover with--dataset/ETHPy150Open pantsbuild/pants/src/python/pants/reporting/quiet_reporter.py/QuietReporter.start_workunit