blob: 323236155cf72cfb887743f3c832df2fe83e372b [file] [log] [blame]
Pier6a0c4de2018-03-18 16:01:30 -07001#!/usr/bin/env python
2"""
3Copyright 2018 Open Networking Foundation (ONF)
4
5Please refer questions to either the onos test mailing list at <onos-test@onosproject.org>,
6the System Testing Plans and Results wiki page at <https://wiki.onosproject.org/x/voMg>,
7or the System Testing Guide page at <https://wiki.onosproject.org/x/WYQg>
8
9TestON is free software: you can redistribute it and/or modify
10it under the terms of the GNU General Public License as published by
11the Free Software Foundation, either version 2 of the License, or
12( at your option ) any later version.
13
14TestON is distributed in the hope that it will be useful,
15but WITHOUT ANY WARRANTY; without even the implied warranty of
16MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17GNU General Public License for more details.
18
19You should have received a copy of the GNU General Public License
20along with TestON. If not, see <http://www.gnu.org/licenses/>.
21"""
22
23import pexpect
24import re
Pier6a0c4de2018-03-18 16:01:30 -070025import os
You Wang4cc61912018-08-28 10:10:58 -070026from drivers.common.cli.emulator.scapyclidriver import ScapyCliDriver
Pier6a0c4de2018-03-18 16:01:30 -070027
You Wang4cc61912018-08-28 10:10:58 -070028class HostDriver( ScapyCliDriver ):
Pier6a0c4de2018-03-18 16:01:30 -070029 """
30 This class is created as a standalone host driver.
31 """
32 def __init__( self ):
33 super( HostDriver, self ).__init__()
34 self.handle = self
35 self.name = None
36 self.shortName = None
You Wangb1665b52019-02-01 15:49:48 -080037 self.interfaces = []
Pier6a0c4de2018-03-18 16:01:30 -070038 self.home = None
You Wang4cc61912018-08-28 10:10:58 -070039 self.inband = False
40 self.prompt = "\$"
41 self.scapyPrompt = ">>>"
Jon Hall62ab6752021-08-22 16:47:43 -070042 self.tempRoutes = []
Pier6a0c4de2018-03-18 16:01:30 -070043
44 def connect( self, **connectargs ):
45 """
46 Creates ssh handle for host.
47 NOTE:
48 The ip_address would come from the topo file using the host tag, the
49 value can be an environment variable as well as a "localhost" to get
50 the ip address needed to ssh to the "bench"
51 """
52 try:
53 for key in connectargs:
54 vars( self )[ key ] = connectargs[ key ]
55 self.name = self.options[ 'name' ]
56 self.shortName = self.options[ 'shortName' ]
You Wangb1665b52019-02-01 15:49:48 -080057 self.interfaces.append( { 'ips': [ self.options[ 'ip' ] ],
58 'isUp': True,
59 'mac': self.options[ 'mac' ],
Jon Hall4d956de2021-06-09 10:09:20 -070060 'dhcp': self.options.get( 'dhcp', "False" ),
Jon Hall43060f62020-06-23 13:13:33 -070061 'name': self.options.get( 'interfaceName', None ) } )
Pier6a0c4de2018-03-18 16:01:30 -070062
63 try:
64 if os.getenv( str( self.ip_address ) ) is not None:
65 self.ip_address = os.getenv( str( self.ip_address ) )
66 else:
67 main.log.info( self.name +
68 ": Trying to connect to " +
69 self.ip_address )
70 except KeyError:
71 main.log.info( "Invalid host name," +
72 " connecting to local host instead" )
73 self.ip_address = 'localhost'
74 except Exception as inst:
75 main.log.error( "Uncaught exception: " + str( inst ) )
76
77 self.handle = super(
78 HostDriver,
79 self ).connect(
80 user_name=self.user_name,
81 ip_address=self.ip_address,
82 port=None,
83 pwd=self.pwd )
84
Jon Hallceed0a32021-06-08 11:07:00 -070085 # Update IP of interfaces if using dhcp
86 for intf in self.interfaces:
87 if intf[ 'dhcp' ].lower() == "true":
88 ip = self.getIPAddress( iface=intf[ 'name' ] )
89 if ip:
90 intf['ips'] = [ ip ]
91 else:
92 main.log.warn( self.name + ": Could not find IP of %s" % intf[ 'name' ] )
93
Pier6a0c4de2018-03-18 16:01:30 -070094 if self.handle:
95 main.log.info( "Connection successful to the " +
96 self.user_name +
97 "@" +
98 self.ip_address )
99 self.handle.sendline( "" )
100 self.handle.expect( self.prompt )
101 return main.TRUE
102 else:
103 main.log.error( "Connection failed to " +
104 self.user_name +
105 "@" +
106 self.ip_address )
107 return main.FALSE
108 except pexpect.EOF:
109 main.log.error( self.name + ": EOF exception found" )
110 main.log.error( self.name + ": " + self.handle.before )
111 main.cleanAndExit()
112 except Exception:
113 main.log.exception( self.name + ": Uncaught exception!" )
114 main.cleanAndExit()
115
116 def disconnect( self, **connectargs ):
117 """
118 Called when test is complete to disconnect the handle.
119 """
120 response = main.TRUE
121 try:
122 if self.handle:
Jon Hall49d781c2021-07-29 11:23:46 -0700123 self.preDisconnect()
Jon Hall62ab6752021-08-22 16:47:43 -0700124 if self.tempRoutes:
125 for r in self.tempRoutes:
126 self.deleteRoute( *r )
Pier6a0c4de2018-03-18 16:01:30 -0700127 # Disconnect from the host
You Wangb1665b52019-02-01 15:49:48 -0800128 if not self.options[ 'inband' ] == 'True':
129 self.handle.sendline( "" )
130 self.handle.expect( self.prompt )
131 self.handle.sendline( "exit" )
132 i = self.handle.expect( [ "closed", pexpect.TIMEOUT ] )
133 if i == 1:
134 main.log.error( self.name + ": timeout when waiting for response" )
Jon Hall43060f62020-06-23 13:13:33 -0700135 main.log.error( self.name + ": response: " + str( self.handle.before ) )
You Wangb1665b52019-02-01 15:49:48 -0800136 else:
137 self.handle.sendline( "" )
138 i = self.handle.expect( [ self.prompt, pexpect.TIMEOUT ], timeout=2 )
139 if i == 1:
140 main.log.warn( self.name + ": timeout when waiting for response" )
Jon Hall43060f62020-06-23 13:13:33 -0700141 main.log.warn( self.name + ": response: " + str( self.handle.before ) )
You Wangb1665b52019-02-01 15:49:48 -0800142 self.handle.sendline( "exit" )
143 i = self.handle.expect( [ "closed", pexpect.TIMEOUT ], timeout=2 )
144 if i == 1:
145 main.log.warn( self.name + ": timeout when waiting for response" )
Jon Hall43060f62020-06-23 13:13:33 -0700146 main.log.warn( self.name + ": response: " + str( self.handle.before ) )
You Wangb1665b52019-02-01 15:49:48 -0800147 return main.TRUE
Pier6a0c4de2018-03-18 16:01:30 -0700148 except TypeError:
149 main.log.exception( self.name + ": Object not as expected" )
150 response = main.FALSE
151 except pexpect.EOF:
152 main.log.error( self.name + ": EOF exception found" )
153 main.log.error( self.name + ": " + self.handle.before )
154 except ValueError:
155 main.log.exception( "Exception in disconnect of " + self.name )
156 response = main.TRUE
157 except Exception:
158 main.log.exception( self.name + ": Connection failed to the host" )
159 response = main.FALSE
160 return response
161
You Wang4cc61912018-08-28 10:10:58 -0700162 def connectInband( self ):
163 """
164 ssh to the host using its data plane IP
165 """
166 try:
167 if not self.options[ 'inband' ] == 'True':
168 main.log.info( "Skip connecting the host via data plane" )
169 return main.TRUE
170 self.handle.sendline( "" )
171 self.handle.expect( self.prompt )
172 self.handle.sendline( "ssh {}@{}".format( self.options[ 'username' ],
173 self.options[ 'ip' ] ) )
174 i = self.handle.expect( [ "password:|Password:", self.prompt, pexpect.TIMEOUT ], timeout=30 )
175 if i == 0:
176 self.handle.sendline( self.options[ 'password' ] )
177 j = self.handle.expect( [ "password:|Password:", self.prompt, pexpect.TIMEOUT ], timeout=10 )
178 if j != 1:
179 main.log.error( "Incorrect password" )
180 return main.FALSE
181 elif i == 1:
182 main.log.info( "Password not required logged in" )
183 else:
184 main.log.error( "Failed to connect to the host" )
185 return main.FALSE
186 self.inband = True
187 return main.TRUE
188 except KeyError:
189 main.log.error( self.name + ": host component not as expected" )
190 main.log.error( self.name + ": " + self.handle.before )
191 return main.FALSE
192 except pexpect.EOF:
193 main.log.error( self.name + ": EOF exception found" )
194 main.log.error( self.name + ": " + self.handle.before )
195 return main.FALSE
196 except Exception:
197 main.log.exception( self.name + ": Uncaught exception!" )
198 main.log.error( self.name + ": " + self.handle.before )
199 return main.FALSE
200
201 def disconnectInband( self ):
202 """
203 Terminate the ssh connection to the host's data plane IP
204 """
205 try:
206 if not self.options[ 'inband' ] == 'True':
207 main.log.info( "Skip disconnecting the host via data plane" )
208 return main.TRUE
209 self.handle.sendline( "" )
You Wangb1665b52019-02-01 15:49:48 -0800210 self.handle.expect( self.prompt, timeout=2 )
You Wang4cc61912018-08-28 10:10:58 -0700211 self.handle.sendline( "exit" )
212 i = self.handle.expect( [ "closed", pexpect.TIMEOUT ], timeout=2 )
213 if i == 1:
214 main.log.error( self.name + ": timeout when waiting for response" )
Jon Hall43060f62020-06-23 13:13:33 -0700215 main.log.error( self.name + ": response: " + str( self.handle.before ) )
You Wang4cc61912018-08-28 10:10:58 -0700216 return main.TRUE
217 except pexpect.EOF:
218 main.log.error( self.name + ": EOF exception found" )
219 main.log.error( self.name + ": " + self.handle.before )
220 return main.FALSE
221 except Exception:
222 main.log.exception( self.name + ": Uncaught exception!" )
223 main.log.error( self.name + ": " + self.handle.before )
224 return main.FALSE
225
Jon Hall62ab6752021-08-22 16:47:43 -0700226 def getRoutes( self ):
227 """
228 Returns the output of 'ip route show' command
229 # TODO: process and return a a list or json object
230 """
231 try:
232 cmd = "ip route show"
233 self.handle.sendline( cmd )
234 i = self.handle.expect( [ "password|Password", self.prompt ] )
235 if i == 0:
236 self.handle.sendline( self.pwd )
237 j = self.handle.expect( [ "password|Password", self.prompt ] )
238 if j != 1:
239 main.log.error( "Incorrect password" )
240 return main.FALSE
241 return self.handle.before
242 except pexpect.EOF:
243 main.log.error( self.name + ": EOF exception found" )
244 main.log.error( self.name + ": " + self.handle.before )
245 return main.FALSE
246 except Exception:
247 main.log.exception( self.name + ": Uncaught exception!" )
248 main.log.error( self.name + ": " + self.handle.before )
249 return main.FALSE
250
Jon Halld3ab3562021-08-25 16:11:54 -0700251 def addRouteToHost( self, route, gw, interface=None, sudoRequired=True, purgeOnDisconnect=True ):
Jon Hall62ab6752021-08-22 16:47:43 -0700252 """
253 Adds a static route to the host
254 Arguments:
255 * route - String, CIDR notation for the destination subnet
256 * gw - String, IP address of gateway
257 Optional Arguments:
258 * interface - String, The interface to use for this route, defaults to None, or the default interface
259 * sudoRequired - Boolean, whether sudo is needed for this command, defaults to True
260 * purgeOnDisconnect - Boolean, remove this route before disconnecting from component
261 """
262 try:
263 cmd = "ip route add %s via %s" % ( route, gw )
264 if sudoRequired:
265 cmd = "sudo %s" % cmd
266 if interface:
267 cmd = "%s dev %s" % ( cmd, interface )
268 if purgeOnDisconnect:
269 self.tempRoutes.append( (route, gw, interface, sudoRequired ) )
270 self.handle.sendline( cmd )
271 i = self.handle.expect( [ "password|Password", self.prompt, "Error" ] )
272 output = ""
273 if i == 2:
274 output += self.handle.before + self.handle.after
275 self.handle.expect( self.prompt )
276 output += self.handle.before + self.handle.after
277 main.log.error( "%s: Erorr in ip route command: %s" % ( self.name, output ) )
278 return main.FALSE
279 elif i == 0:
280 self.handle.sendline( self.pwd )
281 j = self.handle.expect( [ "password|Password", self.prompt, "Error" ] )
282 if j == 0:
283 main.log.error( "Incorrect password" )
284 return main.FALSE
285 elif j == 2:
286 output += self.handle.before + self.handle.after
287 self.handle.expect( self.prompt )
288 output += self.handle.before + self.handle.after
289 main.log.error( "%s: Erorr in ip route command: %s" % ( self.name, output ) )
290 return main.FALSE
291 output += self.handle.before + self.handle.after
292 main.log.debug( output )
293 return self.handle.before
294 except pexpect.EOF:
295 main.log.error( self.name + ": EOF exception found" )
296 main.log.error( self.name + ": " + self.handle.before )
297 return main.FALSE
298 except Exception:
299 main.log.exception( self.name + ": Uncaught exception!" )
300 main.log.error( self.name + ": " + self.handle.before )
301 return main.FALSE
302
303 def deleteRoute( self, route, gw, interface=None, sudoRequired=True ):
304 """
305 Deletess a static route from the host
306 Arguments:
307 * route - String, CIDR notation for the destination subnet
308 * gw - String, IP address of gateway
309 Optional Arguments:
310 * interface - String, The interface to use for this route, defaults to None, or the default interface
311 * sudoRequired - Boolean, whether sudo is needed for this command, defaults to True
312 """
313 try:
314 cmd = "ip route del %s via %s" % ( route, gw )
315 if sudoRequired:
316 cmd = "sudo %s" % cmd
317 if interface:
318 cmd = "%s dev %s" % ( cmd, interface )
319 self.handle.sendline( cmd )
320 i = self.handle.expect( [ "password|Password", self.prompt, "Error" ] )
321 output = ""
322 if i == 2:
323 output += self.handle.before + self.handle.after
324 self.handle.expect( self.prompt )
325 output += self.handle.before + self.handle.after
326 main.log.error( "%s: Erorr in ip route command: %s" % ( self.name, output ) )
327 return main.FALSE
328 elif i == 0:
329 self.handle.sendline( self.pwd )
330 j = self.handle.expect( [ "password|Password", self.prompt, "Error" ] )
331 if j == 0:
332 main.log.error( "Incorrect password" )
333 return main.FALSE
334 elif j == 2:
335 output += self.handle.before + self.handle.after
336 self.handle.expect( self.prompt )
337 output += self.handle.before + self.handle.after
338 main.log.error( "%s: Erorr in ip route command: %s" % ( self.name, output ) )
339 return main.FALSE
340 output += self.handle.before + self.handle.after
341 main.log.debug( output )
342 return self.handle.before
343 except pexpect.EOF:
344 main.log.error( self.name + ": EOF exception found" )
345 main.log.error( self.name + ": " + self.handle.before )
346 return main.FALSE
347 except Exception:
348 main.log.exception( self.name + ": Uncaught exception!" )
349 main.log.error( self.name + ": " + self.handle.before )
350 return main.FALSE
351
Jon Hallceed0a32021-06-08 11:07:00 -0700352 def getIPAddress( self, iface=None, proto='IPV4' ):
353 """
354 Returns IP address of the host
355 """
356 cmd = "ifconfig %s" % iface if iface else ""
357 response = self.command( cmd )
Jon Hall32c90f32021-06-24 16:32:44 -0700358 if "Command 'ifconfig' not found" in response:
359 # ip a show dev
360 cmd = "ip addr show %s" % iface if iface else ""
361 response = self.command( cmd )
362 pattern = ''
363 if proto == 'IPV4':
364 pattern = "inet\s(\d+\.\d+\.\d+\.\d+)/\d+"
365 else:
366 pattern = "inet6\s([\w,:]*)/\d+"
Jon Hallceed0a32021-06-08 11:07:00 -0700367 else:
Jon Hall32c90f32021-06-24 16:32:44 -0700368 pattern = ''
369 if proto == 'IPV4':
370 pattern = "inet\s(\d+\.\d+\.\d+\.\d+)\s\snetmask"
371 else:
372 pattern = "inet6\s([\w,:]*)/\d+\s\sprefixlen"
Jon Hallceed0a32021-06-08 11:07:00 -0700373 ipAddressSearch = re.search( pattern, response )
374 if not ipAddressSearch:
375 return None
376 main.log.info(
377 self.name +
378 ": IP-Address is " +
379 ipAddressSearch.group( 1 ) )
380 return ipAddressSearch.group( 1 )
381
Jon Hall43060f62020-06-23 13:13:33 -0700382 def ping( self, dst, ipv6=False, interface=None, wait=3 ):
Pier6a0c4de2018-03-18 16:01:30 -0700383 """
384 Description:
385 Ping from this host to another
386 Required:
387 dst: IP address of destination host
388 Optional:
389 ipv6: will use ping6 command if True; otherwise use ping command
Jon Hall43060f62020-06-23 13:13:33 -0700390 interface: Specify which interface to use for the ping
Pier6a0c4de2018-03-18 16:01:30 -0700391 wait: timeout for ping command
392 """
393 try:
394 command = "ping6" if ipv6 else "ping"
Jon Hall43060f62020-06-23 13:13:33 -0700395 if interface:
396 command += " -I %s " % interface
Pier6a0c4de2018-03-18 16:01:30 -0700397 command += " -c 1 -i 1 -W " + str( wait ) + " " + str( dst )
398 main.log.info( self.name + ": Sending: " + command )
399 self.handle.sendline( command )
400 i = self.handle.expect( [ self.prompt, pexpect.TIMEOUT ],
Jon Halla604fd42018-05-04 14:27:27 -0700401 timeout=wait + 5 )
Jon Hall06fd0df2021-01-25 15:50:06 -0800402 response = self.handle.before
Pier6a0c4de2018-03-18 16:01:30 -0700403 if i == 1:
404 main.log.error(
405 self.name +
406 ": timeout when waiting for response" )
Jon Hall43060f62020-06-23 13:13:33 -0700407 main.log.error( self.name + ": response: " + str( self.handle.before ) )
Pier6a0c4de2018-03-18 16:01:30 -0700408 if re.search( ',\s0\%\spacket\sloss', response ):
409 main.log.info( self.name + ": no packets lost, host is reachable" )
410 return main.TRUE
411 else:
412 main.log.warn(
413 self.name +
414 ": PACKET LOST, HOST IS NOT REACHABLE" )
415 return main.FALSE
416 except pexpect.EOF:
417 main.log.error( self.name + ": EOF exception found" )
418 main.log.error( self.name + ": " + self.handle.before )
419 main.cleanAndExit()
420 except Exception:
421 main.log.exception( self.name + ": Uncaught exception!" )
422 main.cleanAndExit()
423
You Wang0fc21702018-11-02 17:49:18 -0700424 def pingHostSetAlternative( self, dstIPList, wait=1, IPv6=False ):
425 """
426 Description:
427 Ping a set of destination host.
428 Params:
429 dstIPList is a list of destination ip addresses
430 Returns:
431 main.TRUE if the destination host is reachable
432 main.FALSE otherwise
433 """
434 isReachable = main.TRUE
435 wait = int( wait )
436 cmd = "ping"
437 if IPv6:
438 cmd = cmd + "6"
439 cmd = cmd + " -c 1 -i 1 -W " + str( wait )
440 try:
441 for dstIP in dstIPList:
442 pingCmd = cmd + " " + dstIP
443 self.handle.sendline( pingCmd )
444 i = self.handle.expect( [ self.prompt,
445 pexpect.TIMEOUT ],
446 timeout=wait + 5 )
447 if i == 0:
448 response = self.handle.before
449 if not re.search( ',\s0\%\spacket\sloss', response ):
450 main.log.debug( "Ping failed between %s and %s" % ( self.name, dstIP ) )
451 isReachable = main.FALSE
452 elif i == 1:
453 main.log.error( self.name + ": timeout when waiting for response" )
454 isReachable = main.FALSE
455 else:
456 main.log.error( self.name + ": unknown response: " + self.handle.before )
457 isReachable = main.FALSE
458 except pexpect.TIMEOUT:
459 main.log.exception( self.name + ": TIMEOUT exception" )
460 self.exitFromCmd( [ self.prompt ] )
461 isReachable = main.FALSE
462 except pexpect.EOF:
463 main.log.error( self.name + ": EOF exception found" )
464 main.log.error( self.name + ": " + self.handle.before )
465 main.cleanAndExit()
466 except Exception:
467 main.log.exception( self.name + ": Uncaught exception!" )
468 main.cleanAndExit()
469 return isReachable
470
Pier6a0c4de2018-03-18 16:01:30 -0700471 def ifconfig( self, wait=3 ):
472 """
473 Run ifconfig command on host and return output
474 """
475 try:
476 command = "ifconfig"
477 main.log.info( self.name + ": Sending: " + command )
478 self.handle.sendline( command )
Jon Hall32c90f32021-06-24 16:32:44 -0700479 i = self.handle.expect( [ "Command 'ifconfig' not found", self.prompt, pexpect.TIMEOUT ],
Jon Halla604fd42018-05-04 14:27:27 -0700480 timeout=wait + 5 )
Jon Hall32c90f32021-06-24 16:32:44 -0700481 if i == 0:
482 response = self.handle.before
483 self.handle.expect( [ self.prompt, pexpect.TIMEOUT ] )
484 response += str( self.handle.before )
485 main.log.error( self.name + ": Error running ifconfig: %s " % response )
486 return response
487 if i == 2:
Pier6a0c4de2018-03-18 16:01:30 -0700488 main.log.error(
489 self.name +
490 ": timeout when waiting for response" )
Jon Hall43060f62020-06-23 13:13:33 -0700491 main.log.error( self.name + ": response: " + str( self.handle.before ) )
Pier6a0c4de2018-03-18 16:01:30 -0700492 response = self.handle.before
493 return response
494 except pexpect.EOF:
495 main.log.error( self.name + ": EOF exception found" )
496 main.log.error( self.name + ": " + self.handle.before )
497 main.cleanAndExit()
498 except Exception:
You Wang4cc61912018-08-28 10:10:58 -0700499 main.log.exception( self.name + ": uncaught exception!" )
500 main.cleanAndExit()
501
502 def ip( self, options="a", wait=3 ):
503 """
504 Run ip command on host and return output
505 """
506 try:
507 command = "ip {}".format( options )
508 main.log.info( self.name + ": Sending: " + command )
509 self.handle.sendline( command )
510 i = self.handle.expect( [ self.prompt, pexpect.TIMEOUT ],
511 timeout=wait + 5 )
512 if i == 1:
513 main.log.error( self.name + ": timeout when waiting for response" )
Jon Hall43060f62020-06-23 13:13:33 -0700514 main.log.error( self.name + ": response: " + str( self.handle.before ) )
You Wang4cc61912018-08-28 10:10:58 -0700515 response = self.handle.before
516 return response
517 except pexpect.EOF:
518 main.log.error( self.name + ": EOF exception found" )
519 main.log.error( self.name + ": " + self.handle.before )
520 main.cleanAndExit()
521 except Exception:
522 main.log.exception( self.name + ": uncaught exception!" )
523 main.cleanAndExit()
524
Jon Hall43060f62020-06-23 13:13:33 -0700525 def command( self, cmd, wait=3, debug=False):
You Wang4cc61912018-08-28 10:10:58 -0700526 """
527 Run shell command on host and return output
528 Required:
529 cmd: command to run on the host
530 """
531 try:
532 main.log.info( self.name + ": Sending: " + cmd )
533 self.handle.sendline( cmd )
534 i = self.handle.expect( [ self.prompt, pexpect.TIMEOUT ],
535 timeout=wait + 5 )
Jon Hall43060f62020-06-23 13:13:33 -0700536 response = self.handle.before
537 if debug:
538 main.log.debug( response )
You Wang4cc61912018-08-28 10:10:58 -0700539 if i == 1:
540 main.log.error( self.name + ": timeout when waiting for response" )
Jon Hall43060f62020-06-23 13:13:33 -0700541 main.log.error( self.name + ": response: " + str( response ) )
You Wang4cc61912018-08-28 10:10:58 -0700542 return response
543 except pexpect.EOF:
544 main.log.error( self.name + ": EOF exception found" )
545 main.log.error( self.name + ": " + self.handle.before )
546 main.cleanAndExit()
547 except Exception:
548 main.log.exception( self.name + ": uncaught exception!" )
Pier6a0c4de2018-03-18 16:01:30 -0700549 main.cleanAndExit()