jgarzik / python-bitcoinrpc

Python interface to bitcoin's JSON-RPC API
GNU Lesser General Public License v2.1
642 stars 307 forks source link

Handle non-null reponse errors #61

Closed ouillie closed 8 years ago

ouillie commented 8 years ago

The original code was using nested if statements when it should've used logical and. The outer if was passing but the inner if was failing, so it would skip the outer else and return None. Using dict.get simplifies the condition.

reiven commented 8 years ago

+1