aboutsummaryrefslogtreecommitdiff
path: root/util/NetworkOps.py
diff options
context:
space:
mode:
authorGravatar rcoh <rcoh@mit.edu>2010-12-29 12:43:05 -0500
committerGravatar rcoh <rcoh@mit.edu>2010-12-29 12:43:05 -0500
commitc8209d01f9ddf4c6670caee08073924cb33e447f (patch)
tree1e649deb239e56d8f5c5f95482bf78c70c393ebf /util/NetworkOps.py
parentf9aeaf10e3c9077504a78374640e79415734546b (diff)
setting up some more behaviors to get inherited from
Diffstat (limited to 'util/NetworkOps.py')
-rw-r--r--util/NetworkOps.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/util/NetworkOps.py b/util/NetworkOps.py
index 0404975..2fa531e 100644
--- a/util/NetworkOps.py
+++ b/util/NetworkOps.py
@@ -1,8 +1,10 @@
import socket
+from logger import main_log, exception_log
def getConnectedSocket(ip,port):
sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
try:
sock.connect((ip, port))
- except:
- print 'network down'
+ except Exception as inst:
+ main_log.error('Network down. All network based renderers and sensors will not function.',
+ inst)
return sock