File tree 1 file changed +8
-7
lines changed
1 file changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -180,13 +180,14 @@ class CommandImportWordpress(Command, ImportMixin):
180
180
all_tags = set ([])
181
181
182
182
def _find_wordpress_compiler (self ):
183
- for plugin_info in self .site .plugin_manager .getPluginsOfCategory ('PageCompiler' ):
184
- if plugin_info .name == 'wordpress' :
185
- if not plugin_info .is_activated :
186
- self .site .plugin_manager .activatePluginByName (plugin_info .name )
187
- plugin_info .plugin_object .set_site (self .site )
188
- self .wordpress_page_compiler = plugin_info .plugin_object
189
- break
183
+ if self .wordpress_page_compiler is not None :
184
+ return
185
+ plugin_info = self .site .plugin_manager .getPluginByName ('wordpress' , 'PageCompiler' )
186
+ if plugin_info is not None :
187
+ if not plugin_info .is_activated :
188
+ self .site .plugin_manager .activatePluginByName (plugin_info .name )
189
+ plugin_info .plugin_object .set_site (self .site )
190
+ self .wordpress_page_compiler = plugin_info .plugin_object
190
191
191
192
def _read_options (self , options , args ):
192
193
options ['filename' ] = args .pop (0 )
You can’t perform that action at this time.
0 commit comments