From: 
Subject: Debian changes

The Debian packaging of python-aqualogic is maintained in git, using a workflow
similar to the one described in dgit-maint-merge(7).
The Debian delta is represented by this one combined patch; there isn't a
patch queue that can be represented as a quilt series.

A detailed breakdown of the changes is available from their canonical
representation -- git commits in the packaging repository.
For example, to see the changes made by the Debian maintainer in the first
upload of upstream version 1.2.3, you could use:

    % git clone https://git.dgit.debian.org/python-aqualogic
    % cd python-aqualogic
    % git log --oneline 1.2.3..debian/1.2.3-1 -- . ':!debian'

(If you have dgit, use `dgit clone python-aqualogic`, rather than plain `git clone`.)

We don't use debian/source/options single-debian-patch because it has bugs.
Therefore, NMUs etc. may nevertheless have made additional patches.

---

diff --git a/aqualogic/core.py b/aqualogic/core.py
index 0c1bd72..a8bee8a 100644
--- a/aqualogic/core.py
+++ b/aqualogic/core.py
@@ -63,6 +63,7 @@ class AquaLogic():
         self._send_queue = queue.Queue()
         self._multi_speed_pump = False
         self._heater_auto_mode = True  # Assume the heater is in auto mode
+        self._web = None
 
         if web_port and web_port != 0:
             # Start the web server
@@ -283,7 +284,8 @@ class AquaLogic():
                     _LOGGER.debug('%3.3f: Display update: %s',
                                   frame_start_time, parts)
 
-                    self._web.text_updated(text)
+                    if self._web is not None:
+                        self._web.text_updated(text)
 
                     try:
                         if parts[0] == 'Pool' and parts[1] == 'Temp':
diff --git a/tests/test_core.py b/tests/test_core.py
index beee22a..bc654d9 100644
--- a/tests/test_core.py
+++ b/tests/test_core.py
@@ -13,7 +13,7 @@ class TestAquaLogic(object):
         pass
 
     def test_pool(self):
-        aq = AquaLogic()
+        aq = AquaLogic(web_port=0)
         aq.connect_io(FileIO('tests/data/pool_on.bin'))
         aq.process(self.data_changed)
         # Yes it was cold out when I grabbed this data
@@ -30,7 +30,7 @@ class TestAquaLogic(object):
 
 
     def test_spa(self):
-        aq = AquaLogic()
+        aq = AquaLogic(web_port=0)
         aq.connect_io(FileIO('tests/data/spa_on.bin'))
         aq.process(self.data_changed)
         assert aq.is_metric
