Skip to content

Commit

Permalink
fix qodana warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
zim514 committed Feb 12, 2023
1 parent 3b21d4a commit e65a836
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion script.service.hue/resources/lib/hueconnection.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,7 @@ def _discover_bridge_ip(self):

def _discover_nupnp(self):
xbmc.log("[script.service.hue] In kodiHue discover_nupnp()")
req = ""
try:
req = requests.get('https://discovery.meethue.com/')
result = req.json()
Expand All @@ -212,7 +213,7 @@ def _discover_nupnp(self):

def _check_bridge_model(self):
bridge = qhue.Bridge(self.bridge_ip, None, timeout=QHUE_TIMEOUT)
model = ""
model = "" # variable is used

try:
bridge_config = bridge.config()
Expand All @@ -233,6 +234,7 @@ def _check_bridge_model(self):
return None

def _check_version(self):
api_version = ""
b = qhue.Bridge(self.bridge_ip, None, timeout=QHUE_TIMEOUT)
try:
api_version = b.config()['apiversion']
Expand Down
2 changes: 1 addition & 1 deletion script.service.hue/resources/lib/kodiutils.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def cache_get(key: str):
return data
except JSONDecodeError:
# Occurs when Cache is empty or unreadable (Eg. Old SimpleCache data still in memory because Kodi hasn't restarted)
#xbmc.log(f"[script.service.hue] cache_get JSONDecodeError: {key}: {data_str}")
# xbmc.log(f"[script.service.hue] cache_get JSONDecodeError: {key}: {data_str}")
return None


Expand Down

0 comments on commit e65a836

Please sign in to comment.