1
0

show error message when parsing empty tx

This commit is contained in:
ThomasV
2017-08-25 09:27:40 +02:00
parent 01736197f8
commit 32dee14fd0
2 changed files with 4 additions and 3 deletions

View File

@@ -896,6 +896,8 @@ def tx_from_str(txt):
"json or raw hexadecimal"
import json
txt = txt.strip()
if not txt:
raise ValueError("empty string")
try:
bfh(txt)
is_hex = True