瀏覽代碼

[hbase] Truncate HBase API exceptions in popup up to first newline.

Jenny Kim 10 年之前
父節點
當前提交
39b66d4
共有 1 個文件被更改,包括 2 次插入1 次删除
  1. 2 1
      apps/hbase/src/hbase/api.py

+ 2 - 1
apps/hbase/src/hbase/api.py

@@ -50,7 +50,8 @@ class HbaseApi(object):
       if 'Could not connect to' in e.message:
         raise PopupException(_("HBase Thrift 1 server cannot be contacted: %s") % e.message)
       else:
-        raise PopupException(_("Api Error: %s") % e.message)
+        error_msg = e.message.split('\n', 1)[0]
+        raise PopupException(_("Api Error: %s") % error_msg)
 
   def queryCluster(self, action, cluster, *args):
     client = self.connectCluster(cluster)