python/samples/ops.py
def update(ServiceName, Pkg):
    '''
        Desc: Update GameServer
 
        CLI Example:
                opsmod.py ServiceName update Pkg
    '''    
    logging.info('{0} update {1}'.format(ServiceName, Pkg))  
    if Pkg:
        fl = os.path.join(src_path, Pkg)
        try:
            zfile = zipfile.ZipFile(fl,'r')
            for filename in zfile.namelist():
                zfile.extract(filename, des_path[ServiceName])
            return G('Update is successful !')
        except IOError:
            return R('The package is invalid !!!')
    else:
        return R('The package is invalid !!!')

        Desc: Update GameServer
 
        CLI Example:
                opsmod.py ServiceName update Pkg
    
Update GameServer
CLI Example:
opsmod.py ServiceName update Pkg
Update GameServer CLI Example : opsmod . py ServiceName update Pkg
def update(ServiceName, Pkg):
    logging.info('{0} update {1}'.format(ServiceName, Pkg))  
    if Pkg:
        fl = os.path.join(src_path, Pkg)
        try:
            zfile = zipfile.ZipFile(fl,'r')
            for filename in zfile.namelist():
                zfile.extract(filename, des_path[ServiceName])
            return G('Update is successful !')
        except IOError:
            return R('The package is invalid !!!')
    else:
        return R('The package is invalid !!!')
def update ( ServiceName , Pkg ) : logging . info ( '{0} update {1}' . format ( ServiceName , Pkg ) ) if Pkg : fl = os . path . join ( src_path , Pkg ) try : zfile = zipfile . ZipFile ( fl , 'r' ) for filename in zfile . namelist ( ) : zfile . extract ( filename , des_path [ ServiceName ] ) return G ( 'Update is successful !' ) except IOError : return R ( 'The package is invalid !!!' ) else : return R ( 'The package is invalid !!!' )
Desc: Update GameServer
CLI Example:
opsmod.py ServiceName update Pkg
Desc : Update GameServer CLI Example : opsmod . py ServiceName update Pkg
'''
        Desc: Update GameServer
 
        CLI Example:
                opsmod.py ServiceName update Pkg
    '''
ServiceName
Pkg