def formatwarning(message, category, filename, lineno, line=None):
    """Redefined format warning for maya."""
    if issubclass(category, ExecutionWarning) :
        s =  u"%s: %s\n" % (category.__name__, message)
    else :
        s =  u'%s: %s, at line %s, in "%s"\n' % (category.__name__, message, lineno, filename)
#        name, ext = os.path.splitext(filename)
#        line = ""
#        if ext == ".py" :
#            line = unicode(linecache.getline(filename, lineno)).strip()
#            if line:
#                s += (u"#\t %s" % line)
    return s
dataset/ETHPy150Open CountZer0/PipelineConstructionSet/python/maya/site-packages/pymel-1.0.3/pymel/internal/pwarnings.py/formatwarning/original