Skip to content

Commit c40b864

Browse files
authored
Merge pull request #41 from diplozoon/patch-2
Fix a bug when there is no optional argument
2 parents ca1fc29 + 85d883f commit c40b864

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

termgraph/termgraph.py

+5
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,11 @@ def init_args():
122122
action='store_true',
123123
help='Display version and exit'
124124
)
125+
if len(sys.argv) == 1:
126+
if sys.stdin.isatty():
127+
parser.print_usage()
128+
sys.exit(2)
129+
125130
args = vars(parser.parse_args())
126131

127132
if args['custom_tick'] != '':

0 commit comments

Comments
 (0)