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")
コード例 #2
0
ファイル: loadplugin.py プロジェクト: tmforum/tmffiware
    def handle(self, *args, **options):
    	"""
        Loads a new resource plugin
        """

        # Check arguments
        if len(args) != 1:
            raise CommandError("Error: Please specify the path to the plugin package")

        plugin_id = None
        try:
            path = args[0]
            # Load plugin
            plugin_loader = PluginLoader()
            plugin_id = plugin_loader.install_plugin(path)
        except Exception as e:
            raise CommandError(unicode(e))

        self.stdout.write("Your plugin has been loaded with id: " + plugin_id + "\n")
        self.stdout.write("If you want to retrieve the existing plugins, execute: python manage.py listplugins\n")
コード例 #3
0
    def handle(self, *args, **options):
        """
        Loads a new resource plugin
        """

        # Check arguments
        if len(args) != 1:
            raise CommandError("Error: Please specify the path to the plugin package")

        plugin_id = None
        try:
            path = args[0]
            # Load plugin
            plugin_loader = PluginLoader()
            plugin_id = plugin_loader.install_plugin(path)
        except Exception as e:
            raise CommandError(str(e))

        self.stdout.write("Your plugin has been loaded with id: " + plugin_id + "\n")
        self.stdout.write("If you want to retrieve the existing plugins, execute: python manage.py listplugins\n")
コード例 #4
0
    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")