summaryrefslogtreecommitdiffstats
path: root/module/remote/json_converter.py
diff options
context:
space:
mode:
authorGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2013-01-02 22:03:02 +0100
committerGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2013-01-02 22:03:02 +0100
commita786fef06639da439f9edd367db36388dc1c2658 (patch)
tree84b7d7acf23c300bef4b0fd5ee744e408ffc1152 /module/remote/json_converter.py
parentNew naming: pyLoadCore -> pyload (diff)
downloadpyload-a786fef06639da439f9edd367db36388dc1c2658.tar.xz
little cleanup, improved handling of custom exceptions via api
Diffstat (limited to 'module/remote/json_converter.py')
-rw-r--r--module/remote/json_converter.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/module/remote/json_converter.py b/module/remote/json_converter.py
index 76a0d5935..ad7645ccc 100644
--- a/module/remote/json_converter.py
+++ b/module/remote/json_converter.py
@@ -9,12 +9,13 @@ except ImportError:
import ttypes
from ttypes import BaseObject
+from ttypes import ExceptionObject
# json encoder that accepts TBase objects
class BaseEncoder(json.JSONEncoder):
def default(self, o):
- if isinstance(o, BaseObject):
+ if isinstance(o, BaseObject) or isinstance(o, ExceptionObject):
ret = {"@class" : o.__class__.__name__}
for att in o.__slots__:
ret[att] = getattr(o, att)