fix #3
This commit is contained in:
parent
456c53047b
commit
22d6c01a08
@ -112,19 +112,24 @@ class ServiceManager(object):
|
|||||||
return web_services, local_custom_services
|
return web_services, local_custom_services
|
||||||
|
|
||||||
def _get_available_local_services(self):
|
def _get_available_local_services(self):
|
||||||
|
'''
|
||||||
services = set()
|
available local dictionary services
|
||||||
|
'''
|
||||||
|
local_services = set()
|
||||||
for each in config.dirs:
|
for each in config.dirs:
|
||||||
for dirpath, dirnames, filenames in os.walk(each):
|
for dirpath, dirnames, filenames in os.walk(each):
|
||||||
for filename in filenames:
|
for filename in filenames:
|
||||||
service = None
|
service = None
|
||||||
dict_path = os.path.join(dirpath, filename)
|
dict_path = os.path.join(dirpath, filename)
|
||||||
if MdxService.support(dict_path):
|
#if MdxService.support(dict_path):
|
||||||
service = service_wrap(MdxService, dict_path)
|
service = service_wrap(MdxService, dict_path)
|
||||||
if StardictService.support(dict_path):
|
if not service is None:
|
||||||
service = service_wrap(StardictService, dict_path)
|
|
||||||
if service:
|
|
||||||
service.__unique__ = dict_path
|
service.__unique__ = dict_path
|
||||||
services.add(service)
|
local_services.add(service)
|
||||||
|
#if StardictService.support(dict_path):
|
||||||
|
service = service_wrap(StardictService, dict_path)
|
||||||
|
if not service is None:
|
||||||
|
service.__unique__ = dict_path
|
||||||
|
local_services.add(service)
|
||||||
# support mdx dictionary and stardict format dictionary
|
# support mdx dictionary and stardict format dictionary
|
||||||
return services
|
return local_services
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user