def buildmod(*modules):
 missing = [module for module in modules if (not os.path.exists(module))]
 if missing:
  return 'Error: The file ({0}) does not exist.'.format(', '.join(missing))
 cmd = ['znc-buildmod']
 cmd.extend(modules)
 out = __salt__['cmd.run'](cmd, python_shell=False).splitlines()
 return out[(-1)]

def buildmod ( * modules ) : missing = [ module for module in modules if ( not os . path . exists ( module ) ) ] if missing : return 'Error: The file ({0}) does not exist.' . format ( ', ' . join ( missing ) ) cmd = [ 'znc-buildmod' ] cmd . extend ( modules ) out = __salt__ [ 'cmd.run' ] ( cmd , python_shell = False ) . splitlines ( ) return out [ ( - 1 ) ]
build module using znc-buildmod cli example: .