Skip to main content
aboutsummaryrefslogtreecommitdiffstats
path: root/python
diff options
context:
space:
mode:
authorAnton Leherbauer2012-01-27 08:05:51 +0000
committerAnton Leherbauer2012-01-27 08:05:51 +0000
commit7c61eccd251d8f0be0ce05264c6f63e7de2cda66 (patch)
tree9862c368747744b88fdecb42cb50198c87145543 /python
parentcdb2d43e4f1c96093d51cbe253042b3f3c06be4d (diff)
downloadorg.eclipse.tcf-7c61eccd251d8f0be0ce05264c6f63e7de2cda66.tar.gz
org.eclipse.tcf-7c61eccd251d8f0be0ce05264c6f63e7de2cda66.tar.xz
org.eclipse.tcf-7c61eccd251d8f0be0ce05264c6f63e7de2cda66.zip
TCF Python: Fix FileSystemException constructor to accept also unicode
strings
Diffstat (limited to 'python')
-rw-r--r--python/src/tcf/services/filesystem.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/python/src/tcf/services/filesystem.py b/python/src/tcf/services/filesystem.py
index ed52f6d95..d0148dd89 100644
--- a/python/src/tcf/services/filesystem.py
+++ b/python/src/tcf/services/filesystem.py
@@ -1,5 +1,5 @@
-# *******************************************************************************
-# * Copyright (c) 2011 Wind River Systems, Inc. and others.
+# *****************************************************************************
+# * Copyright (c) 2011, 2012 Wind River Systems, Inc. and others.
# * All rights reserved. This program and the accompanying materials
# * are made available under the terms of the Eclipse Public License v1.0
# * which accompanies this distribution, and is available at
@@ -7,7 +7,7 @@
# *
# * Contributors:
# * Wind River Systems - initial API and implementation
-# *******************************************************************************
+# ****************************************************************************
"""
File System service provides file transfer (and more generally file
@@ -239,7 +239,7 @@ class FileSystemException(IOError):
The class to represent File System error reports.
"""
def __init__(self, message_or_exception):
- if isinstance(message_or_exception, str):
+ if isinstance(message_or_exception, (str, unicode)):
super(FileSystemException, self).__init__(message_or_exception)
elif isinstance(message_or_exception, Exception):
self.caused_by = message_or_exception
@@ -283,7 +283,7 @@ class FileSystemService(services.Service):
"""
Read bytes from an open file.
In response to this request, the server will read as many bytes as it
- can from the file (up to 'len'), and return them in a byte array.
+ can from the file (up to 'length'), and return them in a byte array.
If an error occurs or EOF is encountered, the server may return
fewer bytes then requested. Call back method doneRead() argument 'error'
will be not None in case of error, and argument 'eof' will be

Back to the top