#NEWLINE# def _check_pub_data( self , pub_data ) : #NEWLINE# #INDENT# '\n        Common checks on the pub_data data structure returned from running pub\n        ' #NEWLINE# if ( not pub_data ) : #NEWLINE# #INDENT# raise EauthAuthenticationError ( 'Failed to authenticate! This is most likely because this user is not permitted to execute commands, but there is a small possibility that a disk error occurred (check disk/inode usage).' ) #NEWLINE# #UNINDENT# if ( 'jid' not in pub_data ) : #NEWLINE# #INDENT# return { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# #UNINDENT# if ( pub_data [ 'jid' ] == '0' ) : #NEWLINE# #INDENT# print ( 'Failed to connect to the Master, is the Salt Master running?' ) #NEWLINE# return { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# #UNINDENT# if ( not self . opts . get ( 'order_masters' ) ) : #NEWLINE# #INDENT# if ( not pub_data [ 'minions' ] ) : #NEWLINE# #INDENT# print ( 'No minions matched the target. No command was sent, no jid was assigned.' ) #NEWLINE# return { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# self . event . subscribe ( 'syndic/.*/{0}' . format ( pub_data [ 'jid' ] ) , 'regex' ) #NEWLINE# #UNINDENT# self . event . subscribe ( 'salt/job/{0}' . format ( self [ 'jid' ] ) ) #NEWLINE# return pub_data