projects
/
python_utils.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Scale back warnings.warn and add stacklevels= where appropriate.
[python_utils.git]
/
smart_home
/
lights.py
diff --git
a/smart_home/lights.py
b/smart_home/lights.py
index 44b3634cd5fb9f5c84620762701f120db8bd3977..237d4e0d93b6c294a13eb95a504d2e125738725c 100644
(file)
--- a/
smart_home/lights.py
+++ b/
smart_home/lights.py
@@
-11,7
+11,6
@@
import re
import subprocess
import sys
from typing import Any, Dict, List, Optional, Tuple
import subprocess
import sys
from typing import Any, Dict, List, Optional, Tuple
-import warnings
from overrides import overrides
import tinytuya as tt
from overrides import overrides
import tinytuya as tt
@@
-49,7
+48,6
@@
def tplink_light_command(command: str) -> bool:
if signal != 0:
msg = f'{command} died with signal {signal}'
logger.warning(msg)
if signal != 0:
msg = f'{command} died with signal {signal}'
logger.warning(msg)
- warnings.warn(msg)
logging_utils.hlog(msg)
return False
else:
logging_utils.hlog(msg)
return False
else:
@@
-57,7
+55,6
@@
def tplink_light_command(command: str) -> bool:
if exit_value != 0:
msg = f'{command} failed, exited {exit_value}'
logger.warning(msg)
if exit_value != 0:
msg = f'{command} failed, exited {exit_value}'
logger.warning(msg)
- warnings.warn(msg)
logging_utils.hlog(msg)
return False
logger.debug(f'{command} succeeded.')
logging_utils.hlog(msg)
return False
logger.debug(f'{command} succeeded.')