Skip to content

Commit

Permalink
Merge pull request #42 from Garulf/disable-ssl-warning-crash
Browse files Browse the repository at this point in the history
Disable urllib3 warnings from printing to console and crashing plugin
  • Loading branch information
Garulf authored Feb 22, 2023
2 parents 65a14b3 + 61241db commit ad98472
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion plugin.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"Name": "HA-Commander",
"Description": "Search, and interact with Home Assistant using Wox or Flow Launcher.",
"Author": "Garulf",
"Version": "5.0.1",
"Version": "5.1.0",
"Language": "python",
"Website": "https://github.com/Garulf/HA-Commander",
"IcoPath": "icons\\home-assistant.png",
Expand Down
4 changes: 4 additions & 0 deletions plugin/homeassistant.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,17 @@
from functools import partial, wraps
import webbrowser
import logging
import urllib3
from urllib3.exceptions import InsecureRequestWarning

import requests
from requests.exceptions import ConnectionError, HTTPError

from icons import DEFAULT_ICONS

log = logging.getLogger(__name__)
# This warning prints to stdout and is not catchable so we need to disable it
urllib3.disable_warnings(InsecureRequestWarning)

COLORS_FILE = "./plugin/colors.json"
META_FILE = "./meta.json"
Expand Down

0 comments on commit ad98472

Please sign in to comment.