[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
r5657 - trunk/gnue-common/src/rpc
From: |
reinhard |
Subject: |
r5657 - trunk/gnue-common/src/rpc |
Date: |
Tue, 6 Apr 2004 15:45:42 -0500 (CDT) |
Author: reinhard
Date: 2004-04-06 15:45:41 -0500 (Tue, 06 Apr 2004)
New Revision: 5657
Modified:
trunk/gnue-common/src/rpc/client.py
Log:
Fixed DistantError for exceptions with messages more than a line long.
Modified: trunk/gnue-common/src/rpc/client.py
===================================================================
--- trunk/gnue-common/src/rpc/client.py 2004-04-06 19:42:16 UTC (rev 5656)
+++ trunk/gnue-common/src/rpc/client.py 2004-04-06 20:45:41 UTC (rev 5657)
@@ -109,10 +109,20 @@
"""
def __init__ (self, traceback):
self.detail = traceback
+ self.type = ''
+ message = ''
+
+ # Search for start of Exception type/value part
list = string.split (traceback, '\n')
- info = string.split (list [-2], ': ')
- self.type = info [0]
- Error.__init__ (self, info [1])
+ print list
+ for i in range (1, len (list) - 1):
+ if len (list [i]) > 0 and list [i] [0] != ' ':
+ info = string.split (list [i], ': ', 1)
+ if len (info) == 2:
+ self.type = info [0]
+ message = string.join ([info [1]] + list [i+1:], '\n')
+ break
+ Error.__init__ (self, message)
# =============================================================================
# Self test code - requires server.py running
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- r5657 - trunk/gnue-common/src/rpc,
reinhard <=