#NEWLINE# def valid_web_plugin( self , plugin ) : #NEWLINE# #INDENT# "\n        Validate a web plugin, ensuring it is a web plugin and has the\n        necessary fields present.\n\n        `plugin` is a subclass of scruffy's Plugin class.\n        " #NEWLINE# if ( issubclass ( plugin , WebPlugin ) and hasattr ( plugin , 'plugin_type' ) and ( plugin . plugin_type == 'web' ) and hasattr ( plugin , 'name' ) and ( plugin . name != None ) ) : #NEWLINE# #INDENT# return True #NEWLINE# #UNINDENT# return False