Archived
1
0
Fork 0

Make github_username optional

Do not fetch starred repos in case github_username is not set.
This commit is contained in:
Michal Čihař 2018-11-26 10:08:37 +01:00 committed by GitHub
parent b39dba38ac
commit 88f972668f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -71,7 +71,8 @@ async def main(loop, sites):
wall = Wallabag(host=config["wallabag"]["host"], client_secret=config["wallabag"]["client_secret"],
client_id=config["wallabag"]["client_id"], token=token, aio_sess=session)
sites = github_stars.get_starred_repos(config["github_username"], sites)
if "github_username" in config:
sites = github_stars.get_starred_repos(config["github_username"], sites)
await asyncio.gather(*[handle_feed(session, wall, sitetitle, site) for sitetitle, site in sites.items()])