#NEWLINE# def _match( self , mask , offer ) : #NEWLINE# #INDENT# '\n            Check if the offer is covered by the mask\n        ' #NEWLINE# _check_offer ( offer ) #NEWLINE# if ( '*' not in mask ) : #NEWLINE# #INDENT# return ( offer == mask ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( mask == '*/*' ) : #NEWLINE# #INDENT# return True #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# assert mask . endswith ( '/*' ) #NEWLINE# mask_major = mask [ : ( - 2 ) ] #NEWLINE# offer_major = offer . split ( '/' , 1 ) [ 0 ] #NEWLINE# return ( mask_major == mask_major )