commit 05ee33f4128c7c57c9bea06036181f2a36770497
parent d79770f6dbc8601408dbd6b69503873039ab9a62
Author: Marcel <MTRNord@users.noreply.github.com>
Date: Sat, 12 Nov 2016 20:54:11 +0100
Fix some syntax
Diffstat:
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/__init__.py b/__init__.py
@@ -21,7 +21,6 @@ def _open_file(name):
logger.debug("opening screenshot file: {}".format(name))
return open(name, 'rb')
-@asyncio.coroutine
def _parse_onlineRepos(url, ext=''):
logger.debug("parsing github or gitlab or http(s)")
headers = {
@@ -50,18 +49,17 @@ def _parse_onlineRepos(url, ext=''):
soup = BeautifulSoup(page, 'html.parser')
return [url + '/' + node.get('href') for node in soup.find_all('a') if node.get('href').endswith(ext)]
-@asyncio.coroutine
def _get_iitc_plugins(bot):
logger.debug("getting availible plugins")
if bot.config.exists(["intel_screenbot", "gitlab_token"]):
token = bot.config.get_by_path(["intel_screenbot", "gitlab_token"])
- url = bot.config.get_by_path(["intel_screenbot", "plugin_dirs"])
+ url_config = bot.config.get_by_path(["intel_screenbot", "plugin_dirs"])
ext = '.user.js'
data=[]
for url in url_config:
if "gitlab.com" in url:
url = url + '?private_token=' + token
- for file in listFD(url, ext):
+ for file in _parse_onlineRepos(url, ext):
if "gitlab.com" in url:
item = {"name": file.split('=', file.count('='))[-1].replace(ext, ''), "url": file}
elif 'github.com' in url: