~ubuntu-branches/ubuntu/utopic/gourmet/utopic

« back to all changes in this revision

Viewing changes to src/lib/plugin_loader.py

  • Committer: Bazaar Package Importer
  • Author(s): Steve Langasek
  • Date: 2010-06-07 00:14:10 UTC
  • mfrom: (13.1.5 maverick)
  • Revision ID: james.westby@ubuntu.com-20100607001410-1asehz2hgc5gdk07
* Merge from Debian unstable, remaining changes:
  * debian/control:
    - Recommend python-gtkspell for printing
  * debian/patches/01_fix_raise_str.patch: don't raise str exception
    in src/lib/plugin_gui.py
  * debian/patches/03_dont_remove_nonexistent_plugin.patch: don't
    remove an inactive plugin in plugin_loader.py and don't deactivate
    a plugin from a non-existent database
* Dropped changes, superseded in Debian:
  - Drop forcing of python2.5
  - debian/control: bump Standards-Version to 3.8.3
  - debian/compat: bump to 5
  - debian/control: Depends on python-poppler (needed for printing)
  - add debian/README.source
* Don't set debian/pyversions to 2.5, this is obviously wrong.

Show diffs side-by-side

added added

removed removed

Lines of Context:
51
51
            raise MasterLoader.__single
52
52
        MasterLoader.__single = self
53
53
        curfile = gglobals.__file__ # we count on plugins/ being in the same dir as gglobals  
54
 
        self.plugin_directories = [os.path.join(gglobals.gourmetdir,'plugins/'), # user plug-ins
 
54
        self.plugin_directories = [os.path.join(gglobals.gourmetdir,'plugins'), # user plug-ins
55
55
                                   os.path.join(current_path,'plugins'), # pre-installed plugins
56
56
                                   os.path.join(current_path,'plugins','import_export'), # pre-installed exporter plugins
57
 
                                   os.path.join(gglobals.datad,'plugins/'), # system-wide plug-ins (?)
 
57
                                   os.path.join(gglobals.datad,'plugins'), # system-wide plug-ins (required for windows)
 
58
                                   os.path.join(gglobals.datad,'plugins','import_export'), # exporter plug-ins (required for windows)
58
59
                                   ]
59
60
        self.errors = {}
60
61
        self.pluggables_by_class = {}
173
174
            for plugin in plugin_set.plugins:
174
175
                if self.instantiated_plugins.has_key(plugin):
175
176
                    self.instantiated_plugins[plugin].remove()
176
 
                self.active_plugins.remove(plugin)
 
177
                if plugin in self.active_plugins:
 
178
                    self.active_plugins.remove(plugin)
177
179
 
178
180
    def get_instantiated_plugin (self, plugin):
179
181
        if self.instantiated_plugins.has_key(plugin):