Changeset - 3e09cfb12e3a
[Not reviewed]
default
0 1 0
Laman - 4 years ago 2020-04-13 12:13:23

redirected errors to stderr
1 file changed with 2 insertions and 2 deletions:
0 comments (0 inline, 0 general)
src/cli.py
Show inline comments
 
@@ -57,13 +57,13 @@ def _generate(args):
 

	
 
	try:
 
		shares = generate(secret, args.k, args.n, encoding)
 
		for s in shares:
 
			print(s)
 
	except SException as e:
 
		print(e)
 
		print(e, file=sys.stderr)
 

	
 

	
 
def _reconstruct(args):
 
	encoding = get_encoding(args)
 

	
 
	if args.share:  # provided as a positional argument
 
@@ -77,13 +77,13 @@ def _reconstruct(args):
 
	else:  # redirected from other source
 
		shares = sys.stdin.read().split()
 

	
 
	try:
 
		print(reconstruct(*shares, encoding=encoding, raw=args.raw))
 
	except SException as e:
 
		print(e)
 
		print(e, file=sys.stderr)
 

	
 

	
 
def get_encoding(args):
 
	if args.hex: return "hex"
 
	elif args.b32: return "b32"
 
	elif args.b64: return "b64"
0 comments (0 inline, 0 general)