[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Powerguru-commit] [SCM] powerguru branch, master, updated. 6bc680ddc197
From: |
Rob Savoye |
Subject: |
[Powerguru-commit] [SCM] powerguru branch, master, updated. 6bc680ddc1977d55c7adcc6aa6a9fc7c85e4a4d9 |
Date: |
Mon, 18 Feb 2019 17:28:17 -0500 (EST) |
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "powerguru".
The branch, master has been updated
via 6bc680ddc1977d55c7adcc6aa6a9fc7c85e4a4d9 (commit)
from a4374d1ef0c1c26b501e2d2d959fdea16fbb920e (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://git.savannah.gnu.org/cgit/powerguru.git/commit/?id=6bc680ddc1977d55c7adcc6aa6a9fc7c85e4a4d9
commit 6bc680ddc1977d55c7adcc6aa6a9fc7c85e4a4d9
Author: Rob Savoye <address@hidden>
Date: Mon Feb 18 15:28:11 2019 -0700
Don't try to start the server if one is currently running.
diff --git a/python/pgd.py b/python/pgd.py
index a9760a5..af88392 100755
--- a/python/pgd.py
+++ b/python/pgd.py
@@ -163,17 +163,19 @@ if pi is True:
i2c_thread = Thread(target = i2c.ina219_handler, args = (options, sensors))
i2c_thread.start()
-
-# NOTE that this only handles a single connection at a time
-with socketserver.TCPServer(("0.0.0.0", 7654), remote.client_handler) as
server:
+try:
+ server = socketserver.TCPServer(("0.0.0.0", 7654), remote.client_handler)
+ server.allow_reuse_address = True
# Activate the server; this will keep running until you
# interrupt the program with Ctrl-C
- server.allow_reuse_address = True
try:
server.serve_forever()
except KeyboardInterrupt:
server.shutdown()
server.socket.close()
+except:
+ logging.debug("Another pgd is running...")
+
if pi is True:
gpio433_thread.join()
-----------------------------------------------------------------------
Summary of changes:
python/pgd.py | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
hooks/post-receive
--
powerguru
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Powerguru-commit] [SCM] powerguru branch, master, updated. 6bc680ddc1977d55c7adcc6aa6a9fc7c85e4a4d9,
Rob Savoye <=