From 20a779bd8f8c820e6377c173cfd1bc2fc3abf05f Mon Sep 17 00:00:00 2001
From: Fabio Manganiello <blacklight86@gmail.com>
Date: Sun, 16 Dec 2018 16:24:45 +0100
Subject: [PATCH] Replaced `if not` references with `if <var> is not None`

---
 platypush/plugins/sound.py | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/platypush/plugins/sound.py b/platypush/plugins/sound.py
index 579b46023..d0c57a74c 100644
--- a/platypush/plugins/sound.py
+++ b/platypush/plugins/sound.py
@@ -136,7 +136,7 @@ class SoundPlugin(Plugin):
         completed_callback_event = Event()
         file = os.path.abspath(os.path.expanduser(file))
 
-        if not device:
+        if device is None:
             device = self.output_device
 
         def audio_callback(outdata, frames, time, status):
@@ -261,7 +261,7 @@ class SoundPlugin(Plugin):
         if os.path.isfile(file):
             os.unlink(file)
 
-        if not device:
+        if device is None:
             device = self.input_device
 
         if sample_rate is None:
@@ -361,10 +361,10 @@ class SoundPlugin(Plugin):
         self.playback_paused_changed.clear()
         self.recording_paused_changed.clear()
 
-        if not input_device:
+        if input_device is None:
             input_device = self.input_device
 
-        if not output_device:
+        if output_device is None:
             output_device = self.output_device
 
         if sample_rate is None: