Skip to content

Can't use '--enable-port-forwarding' and/or '--disable-dial-tone' flags because len(sys.argv) != 2 #21

@ABelliqueux

Description

@ABelliqueux

Right now, when trying to use thoise flags, you're met with :

Usage: dreampi/dreampi.py start|stop|restart

This is because in 'dreamppi.py', l.701 ;

if len(sys.argv) == 2:

but when using flags, e.g ;sudo dreampi.py start --disable-dial-tone, len(sys.argv) is equal to 3, and can be 4 if both flags are combined.

In order to accept those flags, l.701 could become, but I've not investigated if it breaks something :

if len(sys.argv) >= 2:

Better usage message

Also, maybe the usage message at l.712 could specify that flags should follow the start/stop/restart directive, i.e :

        print(("Usage: %s start|stop|restart [FLAGS]" % sys.argv[0]))

instead of

print(("Usage: %s start|stop|restart" % sys.argv[0]))

I can submit a PR if those solutions look ok to you.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions