File tree Expand file tree Collapse file tree 1 file changed +14
-2
lines changed
Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -586,15 +586,27 @@ def _get_server_features(self):
586586
587587 info = self ._raw_retrieve ('builtins.serverstatus' , _messagelevel = 'error' ,
588588 _apptag = 'UI' )
589- version = tuple ([int (x ) for x in info ['About' ]['Version' ].split ('.' )][:2 ])
590- stype = info ['About' ]['System' ]['OS Name' ].lower ()
589+ if info .severity > 1 :
590+ raise SWATError (info .status )
591+
592+ try :
593+ version = tuple ([int (x ) for x in info ['About' ]['Version' ].split ('.' )][:2 ])
594+ stype = info ['About' ]['System' ]['OS Name' ].lower ()
595+ except KeyError :
596+ import sys
597+ sys .stderr .write ('%s\n ' % info )
598+ raise
591599
592600 # Check for reflection levels feature
593601 kwargs = {}
594602 if version >= (3 , 5 ):
595603 kwargs ['showlabels' ] = False
604+
596605 res = self ._raw_retrieve ('builtins.reflect' , _messagelevel = 'error' ,
597606 _apptag = 'UI' , action = 'builtins.reflect' , ** kwargs )
607+ if res .severity > 1 :
608+ raise SWATError (res .status )
609+
598610 if [x for x in res [0 ]['actions' ][0 ]['params' ] if x ['name' ] == 'levels' ]:
599611 out .add ('reflection-levels' )
600612
You can’t perform that action at this time.
0 commit comments