def handle(self, *args, **options): """ Loads a new resource plugin """ # Check arguments if len(args) < 1: raise CommandError("Error: Please specify the plugin to be deleted") elif len(args) > 1: raise CommandError("Error: Please specify only one plugin to be deleted") try: name = args[0] # Load plugin plugin_loader = PluginLoader() plugin_loader.uninstall_plugin(name) except Exception as e: raise CommandError(unicode(e)) self.stdout.write("The plugin has been removed\n")
def handle(self, *args, **options): """ Loads a new resource plugin """ # Check arguments if len(args) < 1: raise CommandError( "Error: Please specify the plugin to be deleted") elif len(args) > 1: raise CommandError( "Error: Please specify only one plugin to be deleted") try: name = args[0] # Load plugin plugin_loader = PluginLoader() plugin_loader.uninstall_plugin(name) except Exception as e: raise CommandError(unicode(e)) self.stdout.write("The plugin has been removed\n")