Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnton Leherbauer2012-01-26 02:36:22 -0500
committerAnton Leherbauer2012-01-26 02:36:52 -0500
commit6b8be7fdb7aa333d3426c4e0c9690b917fdbf1da (patch)
treeeea05df8e705a0a15f2ea4e3f58a315a679c0c8e
parent9003483b0af44ea48fbf09855c5853a38e75b785 (diff)
downloadorg.eclipse.tcf-6b8be7fdb7aa333d3426c4e0c9690b917fdbf1da.tar.gz
org.eclipse.tcf-6b8be7fdb7aa333d3426c4e0c9690b917fdbf1da.tar.xz
org.eclipse.tcf-6b8be7fdb7aa333d3426c4e0c9690b917fdbf1da.zip
TCF Python: Fix FileSystemCommand._toSFError conversion bugs
-rw-r--r--python/src/tcf/services/remote/FileSystemProxy.py19
1 files changed, 11 insertions, 8 deletions
diff --git a/python/src/tcf/services/remote/FileSystemProxy.py b/python/src/tcf/services/remote/FileSystemProxy.py
index 370625f69..203edd176 100644
--- a/python/src/tcf/services/remote/FileSystemProxy.py
+++ b/python/src/tcf/services/remote/FileSystemProxy.py
@@ -44,17 +44,20 @@ class FileSystemCommand(Command):
super(FileSystemCommand, self).__init__(service.channel, service, command, args)
def _toSFError(self, data):
- if data is None: return None
- error_code = map.get(errors.ERROR_CODE)
+ if data is None:
+ return None
+ error_code = data.get(errors.ERROR_CODE)
cmd = self.getCommandString()
- if len(cmd) > 72: cmd = cmd[0, 72] + "..."
+ if len(cmd) > 72:
+ cmd = cmd[0:72] + "..."
s = Status(error_code,
"TCF command exception:" +
"\nCommand: " + cmd +
- "\nException: " + self.toErrorString(data) +
- "\nError code: " + error_code, map)
- caused_by = map.get(errors.ERROR_CAUSED_BY)
- if caused_by is not None: s.initCause(self.toError(caused_by, False))
+ "\nException: " + errors.toErrorString(data) +
+ "\nError code: " + str(error_code), data)
+ caused_by = data.get(errors.ERROR_CAUSED_BY)
+ if caused_by is not None:
+ s.initCause(self.toError(caused_by, False))
return s
class FileSystemProxy(filesystem.FileSystemService):
@@ -396,7 +399,7 @@ class FileSystemProxy(filesystem.FileSystemService):
assert handle.getService() is self
done = self._makeCallback(done)
id = handle.id
- binary = bytearray(data[data_pos:data_pos+data_size])
+ binary = bytearray(data[data_pos:data_pos + data_size])
service = self
class WriteCommand(FileSystemCommand):
def __init__(self):

Back to the top