예제 #1
0
파일: shell.py 프로젝트: unnch/spell-sat
def Cleanup():
    import __main__
    from spell.lib.drivermgr import DriverManager
    from spell.lib.registry import REGISTRY
    from server.ui.cmdline import ClientIF
    DriverManager.instance().cleanup(shutdown=True)
    for ifc in REGISTRY.interfaces():
        REGISTRY.remove(ifc)
        if __main__.__dict__.has_key(ifc):
            __main__.__dict__.pop(ifc)
    if 'CIF' in REGISTRY.interfaces():
        ClientIF.cleanup()
예제 #2
0
파일: shell.py 프로젝트: unnch/spell-sat
def Cleanup():
    import __main__
    from spell.lib.drivermgr import DriverManager
    from spell.lib.registry import REGISTRY
    from server.ui.cmdline import ClientIF

    DriverManager.instance().cleanup(shutdown=True)
    for ifc in REGISTRY.interfaces():
        REGISTRY.remove(ifc)
        if __main__.__dict__.has_key(ifc):
            __main__.__dict__.pop(ifc)
    if "CIF" in REGISTRY.interfaces():
        ClientIF.cleanup()
예제 #3
0
파일: shell.py 프로젝트: unnch/spell-sat
def Setup(ctxName, showProgress=True):
    import __main__
    from spell.lib.drivermgr import DriverManager
    from spell.lib.registry import REGISTRY
    from server.ui.cmdline import ClientIF
    from spell.config.reader import Config

    try:
        DriverManager.instance().setup(ctxName)
    except SpellException, ex:
        print "Unable to setup driver: ", ex.message, ex.reason
        DriverManager.instance().cleanup(force=True)
        return False
예제 #4
0
파일: shell.py 프로젝트: unnch/spell-sat
def Setup(ctxName, showProgress=True):
    import __main__
    from spell.lib.drivermgr import DriverManager
    from spell.lib.registry import REGISTRY
    from server.ui.cmdline import ClientIF
    from spell.config.reader import Config

    try:
        DriverManager.instance().setup(ctxName)
    except SpellException, ex:
        print "Unable to setup driver: ", ex.message, ex.reason
        DriverManager.instance().cleanup(force=True)
        return False