Browse Source

避免拉代码报错的情况下错误提示不显示,很难排查问题

钟雪松 5 years ago
parent
commit
d56353c0cc
1 changed files with 1 additions and 1 deletions
  1. 1 1
      walle/service/websocket.py

+ 1 - 1
walle/service/websocket.py

@@ -62,7 +62,7 @@ class WalleSocketIO(Namespace):
             branches = wi.list_branch()
             emit('branches', {'event': 'branches', 'data': branches}, room=self.room)
         except Exception as e:
-            emit('branches', {'event': 'error', 'data': {'message': e.message}}, room=self.room)
+            emit('branches', {'event': 'error', 'data': {'message': e.message or str(e)}}, room=self.room)
 
     def on_tags(self, message=None):
         wi = Deployer(project_id=self.room)