Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnton Leherbauer2012-01-26 02:36:22 -0500
committerAnton Leherbauer2012-01-26 02:39:53 -0500
commit71aa07df65adb5ef20cbb7c0dad499f76d611416 (patch)
tree7a760acd09eb58e04d9704134be2a4361074ae0b /python/src
parent3baab8979643daf79b30c07de4916b9f15e75ab3 (diff)
downloadorg.eclipse.tcf-71aa07df65adb5ef20cbb7c0dad499f76d611416.tar.gz
org.eclipse.tcf-71aa07df65adb5ef20cbb7c0dad499f76d611416.tar.xz
org.eclipse.tcf-71aa07df65adb5ef20cbb7c0dad499f76d611416.zip
TCF Python: Fix FileSystemCommand._toSFError conversion bugs
Diffstat (limited to 'python/src')
-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