@@ -97,6 +97,7 @@ class UIRootNode(UINode):
9797 ui_desc_discovery = {
9898 'nqn' : ('string' , 'Discovery NQN' ),
9999 }
100+
100101 def __init__ (self , shell ):
101102 UINode .__init__ (self , '/' , parent = None , cfnode = nvme .Root (),
102103 shell = shell )
@@ -188,9 +189,10 @@ class UISubsystemNode(UINode):
188189 info .append ("serial=" + self .cfnode .get_attr ("attr" , "serial" ))
189190 return (", " .join (info ), True )
190191
192+
191193class UIPassthruNode (UINode ):
192194 ui_desc_device = {
193- 'path' : ('string' , 'Passthru device path' )
195+ 'path' : ('string' , 'Passthru device path' )
194196 }
195197
196198 def __init__ (self , parent ):
@@ -207,7 +209,7 @@ class UIPassthruNode(UINode):
207209 try :
208210 self .cfnode .set_enable (1 )
209211 self .shell .log .info ("The passthru has been enabled." )
210- except Exception as e :
212+ except Exception :
211213 raise configshell .ExecutionError (
212214 "The passthru could not be enabled." )
213215
@@ -218,7 +220,7 @@ class UIPassthruNode(UINode):
218220 try :
219221 self .cfnode .set_enable (0 )
220222 self .shell .log .info ("The passthru has been disabled." )
221- except Exception as e :
223+ except Exception :
222224 raise configshell .ExecutionError (
223225 "The passthru could not be disabled." )
224226
@@ -229,7 +231,7 @@ class UIPassthruNode(UINode):
229231 '''
230232 try :
231233 self .cfnode .set_clear_ids (clear )
232- except Exception as e :
234+ except Exception :
233235 raise configshell .ExecutionError (
234236 "Failed to set clear_ids for this passthru target." )
235237
@@ -239,7 +241,7 @@ class UIPassthruNode(UINode):
239241 '''
240242 try :
241243 self .cfnode .set_admin_timeout (timeout )
242- except Exception as e :
244+ except Exception :
243245 raise configshell .ExecutionError (
244246 "Failed to set the admin passthru command timeout." )
245247
@@ -249,7 +251,7 @@ class UIPassthruNode(UINode):
249251 '''
250252 try :
251253 self .cfnode .set_io_timeout (timeout )
252- except Exception as e :
254+ except Exception :
253255 raise configshell .ExecutionError (
254256 "Failed to set the IO passthru command timeout." )
255257
@@ -265,6 +267,7 @@ class UIPassthruNode(UINode):
265267 info .append ("enabled" if self .cfnode .get_enable () else "disabled" )
266268 return (", " .join (info ), True )
267269
270+
268271class UINamespacesNode (UINode ):
269272 def __init__ (self , parent ):
270273 UINode .__init__ (self , 'namespaces' , parent )
@@ -329,7 +332,7 @@ class UINamespaceNode(UINode):
329332 try :
330333 self .cfnode .set_enable (1 )
331334 self .shell .log .info ("The Namespace has been enabled." )
332- except Exception as e :
335+ except Exception :
333336 raise configshell .ExecutionError (
334337 "The Namespace could not be enabled." )
335338
@@ -347,7 +350,7 @@ class UINamespaceNode(UINode):
347350 try :
348351 self .cfnode .set_enable (0 )
349352 self .shell .log .info ("The Namespace has been disabled." )
350- except Exception as e :
353+ except Exception :
351354 raise configshell .ExecutionError (
352355 "The Namespace could not be disabled." )
353356
@@ -357,7 +360,7 @@ class UINamespaceNode(UINode):
357360 '''
358361 try :
359362 self .cfnode .set_grpid (grpid )
360- except Exception as e :
363+ except Exception :
361364 raise configshell .ExecutionError (
362365 "Failed to set ANA Group ID for this Namespace." )
363366
@@ -513,7 +516,7 @@ class UIPortNode(UINode):
513516 '''
514517 try :
515518 inline_data_size = self .cfnode .get_attr ("param" , "inline_data_size" )
516- except Exception as e :
519+ except Exception :
517520 inline_data_size = "n/a"
518521 if inline_data_size != "n/a" :
519522 info .append ("inline_data_size=" + inline_data_size )
@@ -648,7 +651,7 @@ class UIReferralNode(UINode):
648651 try :
649652 self .cfnode .set_enable (1 )
650653 self .shell .log .info ("The Referral has been enabled." )
651- except Exception as e :
654+ except Exception :
652655 raise configshell .ExecutionError (
653656 "The Referral could not be enabled." )
654657
@@ -666,7 +669,7 @@ class UIReferralNode(UINode):
666669 try :
667670 self .cfnode .set_enable (0 )
668671 self .shell .log .info ("The Referral has been disabled." )
669- except Exception as e :
672+ except Exception :
670673 raise configshell .ExecutionError (
671674 "The Referral could not be disabled." )
672675
@@ -706,7 +709,7 @@ class UIANAGroupsNode(UINode):
706709
707710class UIANAGroupNode (UINode ):
708711 ui_desc_ana = {
709- 'state' : ('string' , 'ANA state' ),
712+ 'state' : ('string' , 'ANA state' ),
710713 }
711714
712715 def __init__ (self , parent , cfnode ):
@@ -717,6 +720,7 @@ class UIANAGroupNode(UINode):
717720 info .append ("state=" + self .cfnode .get_attr ("ana" , "state" ))
718721 return (", " .join (info ), True )
719722
723+
720724class UIHostsNode (UINode ):
721725 def __init__ (self , parent ):
722726 UINode .__init__ (self , 'hosts' , parent )
0 commit comments