vikstrous / pirate-get

A command line interface for The Pirate Bay
GNU Affero General Public License v3.0
337 stars 53 forks source link

tidy up search_mirrors function #88

Closed rnhmjoj closed 8 years ago

rnhmjoj commented 8 years ago

Maybe I'm missing something but this seemed to be over complicated

vikstrous commented 8 years ago

This looks like an improvement in readability. The tests seems happy, so it should be fine. Just two minor comments above.

coveralls commented 8 years ago

Coverage Status

Coverage decreased (-0.07%) to 84.586% when pulling e64a196973bf187424f9c5635bd805be5dbba5be on search-mirror into 2212e292f069d44917a11d1ad1bb93d3c9ec9118 on master.

vikstrous commented 8 years ago

I think we should try to avoid the use of sys.exit and let the caller decide how to handle errors.

rnhmjoj commented 8 years ago

Raise an exception and catch that in the main, like KeyboardInterrupt?

vikstrous commented 8 years ago

yeah, that sounds reasonable

coveralls commented 8 years ago

Coverage Status

Coverage decreased (-0.5%) to 84.13% when pulling 2f40523db246ed9c7ceae64f03d7b33a52634960 on search-mirror into 2212e292f069d44917a11d1ad1bb93d3c9ec9118 on master.

rnhmjoj commented 8 years ago

Ok?

vikstrous commented 8 years ago

Lgtm