Skip to content

Commit 18883b9

Browse files
authored
Merge pull request #618 from geeksville/pr-fixstdout
make specifying an argument to --seriallog optional
2 parents 18c2d08 + a04b349 commit 18883b9

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

.vscode/launch.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@
164164
"request": "launch",
165165
"module": "meshtastic",
166166
"justMyCode": true,
167-
"args": ["--debug", "--seriallog", "stdout"]
167+
"args": ["--debug", "--seriallog"]
168168
},
169169
{
170170
"name": "meshtastic test",

meshtastic/__main__.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1170,7 +1170,10 @@ def initParser():
11701170

11711171
group.add_argument(
11721172
"--seriallog",
1173-
help="Log device serial output to either 'stdout', 'none' or a filename to append to.",
1173+
help="Log device serial output to either 'none' or a filename to append to. Defaults to 'stdout' if no filename specified.",
1174+
nargs='?',
1175+
const="stdout",
1176+
default=None
11741177
)
11751178

11761179
group.add_argument(

0 commit comments

Comments
 (0)