changes
This commit is contained in:
parent
5b511de9e7
commit
a48118331c
@ -38,7 +38,7 @@ def defaultBase():
|
|||||||
return os.path.join(loc, "Anki")
|
return os.path.join(loc, "Anki")
|
||||||
'''
|
'''
|
||||||
path = mw.pm.addonFolder()
|
path = mw.pm.addonFolder()
|
||||||
return path[:path.rindex(os.path.sep)]
|
return os.path.dirname(os.path.abspath(path))
|
||||||
|
|
||||||
|
|
||||||
headers = {"User-Agent": "AnkiHub"}
|
headers = {"User-Agent": "AnkiHub"}
|
||||||
|
|||||||
@ -74,7 +74,7 @@ class ServiceManager(object):
|
|||||||
"""
|
"""
|
||||||
service_path = u'dict'
|
service_path = u'dict'
|
||||||
web_services, local_custom_services = list(), list()
|
web_services, local_custom_services = list(), list()
|
||||||
mypath = os.path.dirname(os.path.realpath(__file__)) + os.path.sep + service_path
|
mypath = os.path.join(os.path.dirname(os.path.realpath(__file__)), service_path)
|
||||||
files = [f for f in os.listdir(mypath)
|
files = [f for f in os.listdir(mypath)
|
||||||
if f not in ('__init__.py') and not f.endswith('.pyc') and not os.path.isdir(mypath+os.sep+f)]
|
if f not in ('__init__.py') and not f.endswith('.pyc') and not os.path.isdir(mypath+os.sep+f)]
|
||||||
base_class = (WebService, LocalService,
|
base_class = (WebService, LocalService,
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user