From 9cbab69135422dae6d78c0917c8f729385255478 Mon Sep 17 00:00:00 2001 From: Fenhl Date: Thu, 25 Apr 2019 14:35:45 +0000 Subject: [PATCH] Add workaround for https://github.com/kennethreitz/requests/issues/5067 to BitBar plugins --- bitbar/discord.15s.py | 3 +++ bitbar/twitch.1m.py | 6 ++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/bitbar/discord.15s.py b/bitbar/discord.15s.py index a99f253..e20a38d 100755 --- a/bitbar/discord.15s.py +++ b/bitbar/discord.15s.py @@ -4,6 +4,9 @@ sys.path.append('/opt/git/github.com/fenhl/syncbin/master/python') +import warnings + +warnings.filterwarnings('ignore') import basedir import requests diff --git a/bitbar/twitch.1m.py b/bitbar/twitch.1m.py index 96bd095..d531d6b 100755 --- a/bitbar/twitch.1m.py +++ b/bitbar/twitch.1m.py @@ -6,15 +6,17 @@ sys.path.append('/opt/py') -import basedir import collections import datetime import pathlib import re -import requests import subprocess import traceback +warnings.filterwarnings('ignore') +import basedir +import requests + CACHE = basedir.data_dirs('bitbar/plugin-cache/twitch.json').lazy_json(writeable_only=True, default={}) DEFER_DELTAS = { '20m': datetime.timedelta(minutes=20),