aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorHans-Christoph Steiner <eighthave@users.sourceforge.net>2009-04-30 22:05:32 +0000
committerHans-Christoph Steiner <eighthave@users.sourceforge.net>2009-04-30 22:05:32 +0000
commit5aaa09f58c2487b107e8fe64cd61600304f68f9d (patch)
tree7fe2b56444ff31c843d2a3e0a7b5fb74462c3775 /scripts
parentfd1467c8549fbcf6e05436a6b8e61daa491e1b3a (diff)
a new attempt at handling socket exceptions so that the error can be logged
svn path=/trunk/; revision=11213
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/load_every_help.py19
1 files changed, 9 insertions, 10 deletions
diff --git a/scripts/load_every_help.py b/scripts/load_every_help.py
index a7121c9b..6a4a0392 100755
--- a/scripts/load_every_help.py
+++ b/scripts/load_every_help.py
@@ -39,11 +39,7 @@ def make_netreceive_patch(filename):
def send_to_socket(message):
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
- try:
- s.connect(('localhost', PORT))
- except:
- # TODO for now just ignore socket errors....
- pass
+ s.connect(('localhost', PORT))
s.send(message)
s.close()
@@ -132,13 +128,16 @@ for root, dirs, files in os.walk(docdir):
m = re.search(".*\.pd$", name)
if m:
print 'checking ' + name
+ patchoutput = []
patch = os.path.join(root, m.string)
p = launch_pd()
- open_patch(patch)
- time.sleep(1)
- close_patch(patch)
- quit_pd(p)
- patchoutput = []
+ try:
+ open_patch(patch)
+ time.sleep(1)
+ close_patch(patch)
+ quit_pd(p)
+ except socket.error:
+ patchoutput.append('socket.error')
while True:
line = p.stdout.readline()
m = re.search('EOF on socket', line)