Skip to content

Commit a098e08

Browse files
committed
Fixed --help command
1 parent f6fd269 commit a098e08

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

commands/console_write.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,13 @@ def callback(self, data):
5151
return
5252

5353
# run sampy commands
54-
if(data.startswith('sampy')):
54+
if(data.startswith(('sampy', '--help'))):
5555
data = data.split()
56-
cmd = data[1]
56+
try:
57+
cmd = data[1]
58+
except IndexError:
59+
cmd = data[0]
60+
5761
arg = data[2] if(len(data) > 2) else None
5862

5963
th = Thread(target=self.sampy_commands, args=(cmd, arg))

0 commit comments

Comments
 (0)