SF.net SVN: fclient: [225] trunk/sandbox/fcp/fcp2_0_message.py
Status: Pre-Alpha
Brought to you by:
jurner
|
From: <ju...@us...> - 2008-02-18 00:31:36
|
Revision: 225
http://fclient.svn.sourceforge.net/fclient/?rev=225&view=rev
Author: jurner
Date: 2008-02-17 16:31:25 -0800 (Sun, 17 Feb 2008)
Log Message:
-----------
fix: always end messages with 'EndMessage\n'
Modified Paths:
--------------
trunk/sandbox/fcp/fcp2_0_message.py
Modified: trunk/sandbox/fcp/fcp2_0_message.py
===================================================================
--- trunk/sandbox/fcp/fcp2_0_message.py 2008-02-17 09:21:42 UTC (rev 224)
+++ trunk/sandbox/fcp/fcp2_0_message.py 2008-02-18 00:31:25 UTC (rev 225)
@@ -46,7 +46,7 @@
self.data = data
self.name = name
self.params = params
-
+
@classmethod
def bytesFromSocket(clss, socketObj, n):
@@ -198,14 +198,8 @@
value = paramType.pythonToFcp(value)
out.append('%s=%s' % (param, value))
- if self.data:
- out.append('Data')
- out.append(self.data)
- else:
- out.append('EndMessage\n')
+
+ out.append('EndMessage')
+ out.append(self.data if self.data is not None else '')
return '\n'.join(out)
-
-
-
-
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|