Skip to content

Commit

Permalink
Fixes #4
Browse files Browse the repository at this point in the history
  • Loading branch information
mottosso committed Jul 9, 2015
1 parent 7747425 commit 677226d
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions pyblish_rpc/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def stats(self):

def reset(self):
self._context = pyblish.api.Context()
self._plugins = list()
self._plugins = pyblish.api.discover()
self._provider = pyblish.plugin.Provider()

def context(self):
Expand All @@ -73,7 +73,7 @@ def context(self):
return formatting.format_context(self._context)

def discover(self):
return formatting.format_plugins(pyblish.api.discover())
return formatting.format_plugins(self._plugins)

def process(self, plugin, instance=None):
"""Given JSON objects from client, perform actual processing
Expand Down Expand Up @@ -119,11 +119,9 @@ def _dispatch(self, method, params):
traceback.print_exc()
raise e

@classmethod
def _plugin_from_name(cls, name):
def _plugin_from_name(self, name):
"""Parse plug-in id to object"""
plugins = pyblish.api.discover()
plugins = pyblish.lib.ItemList("__name__", plugins)
plugins = pyblish.lib.ItemList("__name__", self._plugins)
return plugins[name]


Expand Down

0 comments on commit 677226d

Please sign in to comment.