Skip to content

Commit 2ccfbdd

Browse files
committed
Remove unused imports and variables
1 parent 6c88bac commit 2ccfbdd

File tree

6 files changed

+3
-8
lines changed

6 files changed

+3
-8
lines changed

hardware/button/ldr_button.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ def __run(self):
4242
self._device["internal_state"] = self.PRESSED if count <= (self.__CAPACITOR * 10000) else self.RELEASED
4343
sleep(0.1)
4444

45-
except KeyboardInterrupt as ex:
45+
except KeyboardInterrupt:
4646
self.stop()
4747

4848
# print(f"Fetch CTRL-c... and now what..? For now.. press again Ctrl-C .. ({ex})")

hardware/webcam/hlslive_webcam.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,6 @@
33

44
logger = terrariumLogging.logging.getLogger(__name__)
55

6-
from io import BytesIO
7-
import subprocess
8-
96
from . import terrariumWebcam
107
from terrariumUtils import terrariumUtils
118

terrariumArea.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33

44
logger = terrariumLogging.logging.getLogger(__name__)
55

6-
from operator import itemgetter
76
import copy
87
import datetime
98
import time

terrariumAudio.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ def volume(__cls__, hw, value=None):
5454
# Try to 'overload' the volume by 20%. Can work for some sound cards
5555
value = int(max(0, min(120, 120 * (value / 100))))
5656
mixer.setvolume(value, alsaaudio.MIXER_CHANNEL_ALL)
57-
except alsaaudio.ALSAAudioError as ex:
57+
except alsaaudio.ALSAAudioError:
5858
try:
5959
# When the 'overloaded' value is to high, fall back to normal max volume
6060
value = int(max(0, min(100, value)))

terrariumNotification.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2329,7 +2329,7 @@ def load_setup(self, setup_data):
23292329
self.connection = mqtt.Client(
23302330
mqtt.CallbackAPIVersion.VERSION1, client_id=f"TerrariumPI {self.setup['version']}"
23312331
)
2332-
except Exception as ex:
2332+
except Exception:
23332333
# Old version
23342334
self.connection = mqtt.Client(client_id=f"TerrariumPI {self.setup['version']}")
23352335

weather/__init__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ def update(self):
5656
self._device["last_update"] is None
5757
or (datetime.now() - self._device["last_update"]).total_seconds() > self.__UPDATE_TIMEOUT
5858
):
59-
start = time.time()
6059
logger.debug(f"Loading online weather data from source: {self.address}")
6160

6261
if self._load_data():

0 commit comments

Comments
 (0)