whitespace (minor)

This commit is contained in:
The MMGen Project 2022-01-21 11:23:45 +00:00
commit 550a07a644
Signed by: mmgen
GPG key ID: 3F8B1861E32B7DA2
3 changed files with 14 additions and 8 deletions

View file

@ -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'

View file

@ -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)))

View file

@ -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 )