<s> from agamotto . utils import execute <EOL> def hasRunLevel ( serviceName , runLevel ) : <EOL> """<STR_LIT>""" <EOL> try : <EOL> raw = execute ( "<STR_LIT>" % ( serviceName ) ) . split ( ) <EOL> except : <EOL> return False <EOL> for stanza in raw [ <NUM_LIT:1> : ] : <EOL> level = int ( stanza [ : <NUM_LIT:1> ] ) <EOL> status = stanza [ <NUM_LIT:2> : ] <EOL> if runLevel == level and status == "<STR_LIT>" : <EOL> return True <EOL> return False <EOL> def disabled ( serviceName ) : <EOL> """<STR_LIT>""" <EOL> return hasRunLevel ( serviceName , <NUM_LIT:3> ) == False <EOL> def enabled ( serviceName ) : <EOL> """<STR_LIT>""" <EOL> return hasRunLevel ( serviceName , <NUM_LIT:3> ) </s>
