#NEWLINE# def _gen_jid( cur ) : #NEWLINE# #INDENT# '\n    Generate an unique job id\n    ' #NEWLINE# jid = salt . utils . jid . gen_jid ( ) #NEWLINE# sql = 'SELECT jid FROM jids WHERE jid = %s' #NEWLINE# cur . execute ( sql , ( jid , ) ) #NEWLINE# data = cur . fetchall ( ) #NEWLINE# if ( not data ) : #NEWLINE# #INDENT# return jid #NEWLINE# #UNINDENT# return None