MOON
Server: Apache
System: Linux server1.studioinfinity.com.br 2.6.32-954.3.5.lve1.4.90.el6.x86_64 #1 SMP Tue Feb 21 12:26:30 UTC 2023 x86_64
User: artinside (517)
PHP: 7.4.33
Disabled: exec,passthru,shell_exec,system
Upload Files
File: //proc/self/root/usr/lib64/python2.6/site-packages/problem/tools.py
import problem


def problemify(probdir, proxy):
    by_analyzer = dict(zip(problem.PROBLEM_TYPES.values(),
                           problem.PROBLEM_TYPES.keys()))

    analyzer = proxy.get_item(probdir, 'analyzer')
    reason = proxy.get_item(probdir, 'reason')

    if analyzer not in by_analyzer:
        return problem.Unknown(reason)

    class_name = by_analyzer[analyzer].lower().capitalize()

    prob = getattr(problem, class_name)(reason)
    prob._probdir = probdir
    prob._persisted = True
    prob._proxy = proxy
    return prob