From a986c1c6926a805e121364d412268c62e1fb858c Mon Sep 17 00:00:00 2001
From: Samuel Gaist <samuel.gaist@idiap.ch>
Date: Thu, 19 Apr 2018 16:33:50 +0200
Subject: [PATCH] [data][RemoteException] Fix __str__

The way the string returned by __str__ is created fails with
Python 3.
---
 beat/backend/python/data.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/beat/backend/python/data.py b/beat/backend/python/data.py
index 572d290..a9f699a 100755
--- a/beat/backend/python/data.py
+++ b/beat/backend/python/data.py
@@ -65,10 +65,10 @@ class RemoteException(Exception):
             self.user_error = message
 
     def __str__(self):
-        if self.system_error != '':
-            return '(sys) ' + self.system_error
+        if self.system_error:
+            return '(sys) {}'.format(self.system_error)
         else:
-            return '(usr) ' + self.user_error
+            return '(usr) {}'.format(self.user_error)
 
 
 #----------------------------------------------------------
-- 
GitLab