Do not spin when upsd closes the connection while PyNUT is reading a reply,
which pegs a CPU in NUT-Monitor.

Upstream commit 3e675fedbbec7f8a38b477e20bb85f00d9a42226, as carried by Fedora.

diff --git a/scripts/python/module/PyNUT.py.in b/scripts/python/module/PyNUT.py.in
index 3296d082b4..783a6c9e8f 100644
--- a/scripts/python/module/PyNUT.py.in
+++ b/scripts/python/module/PyNUT.py.in
@@ -721,7 +721,10 @@ certhost    : Optional dict or list of dict/lists: {hostname: [certname, certver
         while True:
             data_end_index = data.find(finished_reading_data)
             if data_end_index == -1:
-                data += self.__srv_handler.recv(50)  # nut_telnetlib.py uses 50
+                chunk = self.__srv_handler.recv(50)  # nut_telnetlib.py uses 50
+                if not chunk:
+                    raise EOFError("Connection closed by server")
+                data += chunk
             else:
                 break
         data_end_index += len(finished_reading_data)
