From 10458dabdae2eb3d7a63e129ad8198969d2b1e93 Mon Sep 17 00:00:00 2001
From: Yves Noirjean <yves.noirjean@id.ethz.ch>
Date: Fri, 15 Dec 2017 15:11:21 +0100
Subject: [PATCH] obis: showing only error instead of stacktrace for addref /
 clone commands

---
 src/python/OBis/obis/dm/data_mgmt.py | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/src/python/OBis/obis/dm/data_mgmt.py b/src/python/OBis/obis/dm/data_mgmt.py
index 17f0c775329..46ad2c874fa 100644
--- a/src/python/OBis/obis/dm/data_mgmt.py
+++ b/src/python/OBis/obis/dm/data_mgmt.py
@@ -261,14 +261,12 @@ class GitDataMgmt(AbstractDataMgmt):
         try:
             cmd = Clone(self, data_set_id, ssh_user, content_copy_index)
             return cmd.run()
-        except Exception:
-            traceback.print_exc()
-            return CommandResult(returncode=-1, output="Could not clone repository.")
+        except Exception as e:
+            return CommandResult(returncode=-1, output="Error: " + str(e))
 
     def addref(self):
         try:
             cmd = Addref(self)
             return cmd.run()
-        except Exception:
-            traceback.print_exc()
-            return CommandResult(returncode=-1, output="Could not add reference.")
+        except Exception as e:
+            return CommandResult(returncode=-1, output="Error: " + str(e))
-- 
GitLab