Merge #10781: Python cleanups
commit60dd9cc470584960431de425e2a9ffbed0e8034a
authorMarcoFalke <falke.marco@gmail.com>
Mon, 28 Aug 2017 20:53:34 +0000 (29 08:53 +1200)
committerMarcoFalke <falke.marco@gmail.com>
Mon, 28 Aug 2017 20:53:49 +0000 (29 08:53 +1200)
treed937bf4a8316a6d602e2fc5e1f5be48b4c77f0c4
parentcee4fe1d53b2e1ff91ff48bc881cb41dfba01c52
parent78214588d6b8b7199015113c9d0d8250d6150014
Merge #10781: Python cleanups

78214588d Use for-loop instead of list comprehension (practicalswift)
823979436 Use the variable name _ for unused return values (practicalswift)
2e6080bbf Remove unused variables and/or function calls (practicalswift)
9b94054b7 Avoid reference to undefined name: stderr does not exist, sys.stderr does (practicalswift)
51cb6b822 Use print(...) instead of undefined printf(...) (practicalswift)
25cd520fc Use sys.exit(...) instead of exit(...): exit(...) should not be used in programs (practicalswift)

Pull request description:

  Python cleanups:
  * Avoid reference to undefined name: `stderr` does not exist, `sys.stderr` does
  * Use `print(...)` instead of undefined `printf(...)`
  * Avoid redefinition of variable (`tx`) in list comprehension
  * Remove unused variables and/or function calls
  * Use `sys.exit(...)` instead of `exit(...)`: [`exit(...)` should not be used in programs](https://github.com/bitcoin/bitcoin/pull/10753#discussion_r125935027)

Tree-SHA512: 1238dfbc1d20f7edadea5e5406a589f293065638f6234809f0d5b6ba746dffe3d276bc5884c7af388a6c798c61a8759faaccf57f381225644754c0f61914eb4b