remove columns throwing exception
@@ -27,15 +27,20 @@ def add_arguments(parser):
def run(datatype, columns, input):
# import modules locally
+ import socket
import sh # type: ignore
+ from kgtk.exceptions import KGTKException
+ try:
if input:
sh.mlr('--tsv', 'cut', '-x', '-f', columns,
input, _out=sys.stdout, _err=sys.stderr)
elif not sys.stdin.isatty():
- print('reading from stdin')
print(sh.mlr('--tsv', 'cut', '-x', '-f', columns,
_in=sys.stdin, _out=sys.stdout, _err=sys.stderr))
else:
- parser.print_help()
+ raise KGTKException
+ except:
+ raise KGTKException
+ #parser.print_help()
