Skip to content
Myr

Avoid new local variable

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Markus Unterwaditzer · committed by Markus Unterwaditzer · parent 189d616 · Browse files · 1 file+6 added−6 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+6 added−6 removed

  • other:+6 added−6 removed

1 file+6 added−6 removed

modified:click/testing.py+6 added-6 removed
268 unmodified lines
269 exc_info = None270 with self.isolation(input=input, env=env, color=color) as out:271 exception = None272 exit_code = 0273 error_message = ''273274 try:275 cli.main(args=args or (),276 prog_name=self.get_default_prog_name(cli), **extra)277 except SystemExit as e:278 if e.code != 0:279 exception = e280281 exc_info = sys.exc_info()282283 exit_code = e.code284 if not isinstance(exit_code, int):283 error_message = '%s\n' % exit_code285 sys.stdout.write(str(exit_code))286 sys.stdout.write('\n')287 exit_code = 1285 exc_info = sys.exc_info()288 except Exception as e:289 if not catch_exceptions:290 raise291 exception = e292 exit_code = -1293 exc_info = sys.exc_info()294 finally:295 sys.stdout.flush()294 if not PY2:295 error_message = error_message.encode(self.charset)296 output = out.getvalue() + error_message296 output = out.getvalue()297298 return Result(runner=self,299 output_bytes=output,300 exit_code=exit_code,
19 unmodified lines