From 550a07a644df422410a3fe12731e6f4d1cea25f1 Mon Sep 17 00:00:00 2001 From: The MMGen Project Date: Fri, 21 Jan 2022 11:23:45 +0000 Subject: [PATCH] whitespace (minor) --- mmgen/opts.py | 3 ++- mmgen/util.py | 8 ++++++-- test/include/common.py | 11 ++++++----- 3 files changed, 14 insertions(+), 8 deletions(-) diff --git a/mmgen/opts.py b/mmgen/opts.py index 56523ec5..e2fee23d 100755 --- a/mmgen/opts.py +++ b/mmgen/opts.py @@ -524,7 +524,8 @@ def check_usr_opts(usr_opts): # Raises an exception if any check fails try: os.stat(fn) except: b = os.path.dirname(fn) - if b: check_outdir(b) + if b: + check_outdir(b) else: check_outfile(fn,blkdev_ok=True) key2 = 'out_fmt' diff --git a/mmgen/util.py b/mmgen/util.py index d71c1609..bc796c7f 100755 --- a/mmgen/util.py +++ b/mmgen/util.py @@ -376,8 +376,11 @@ def is_int(s): except: return False -def is_hex_str(s): return set(list(s.lower())) <= set(list(hexdigits.lower())) -def is_hex_str_lc(s): return set(list(s)) <= set(list(hexdigits.lower())) +def is_hex_str(s): + return set(list(s.lower())) <= set(list(hexdigits.lower())) + +def is_hex_str_lc(s): + return set(list(s)) <= set(list(hexdigits.lower())) def is_utf8(s): try: s.decode('utf8') @@ -524,6 +527,7 @@ def check_wallet_extension(fn): from .wallet import Wallet if not Wallet.ext_to_type(get_extension(fn)): raise BadFileExtension(f'{fn!r}: unrecognized seed source file extension') + def make_full_path(outdir,outfile): return os.path.normpath(os.path.join(outdir, os.path.basename(outfile))) diff --git a/test/include/common.py b/test/include/common.py index cc55d1e8..17348729 100755 --- a/test/include/common.py +++ b/test/include/common.py @@ -119,11 +119,12 @@ def get_tmpfile(cfg,fn): return os.path.join(cfg['tmpdir'],fn) def write_to_file(fn,data,binary=False): - write_data_to_file( fn, - data, - quiet = True, - binary = binary, - ignore_opt_outdir = True ) + write_data_to_file( + fn, + data, + quiet = True, + binary = binary, + ignore_opt_outdir = True ) def write_to_tmpfile(cfg,fn,data,binary=False): write_to_file( os.path.join(cfg['tmpdir'],fn), data=data, binary=binary )