[PATCH] test:modify connect-service script to take wep

Marcel Holtmann marcel at holtmann.org
Mon Jan 24 08:13:15 PST 2011


Hi Denis,

please refrain from top posting on this mailing list. It is against the
used etiquette here.

> It functions well for wpa, but for wep we must add an extra argument because of ">3" in case below
> So we are obliged to write 
> ./connect-service INTELTEST_WEP acdc123456 wep x           (x being the extra argument to say it is not wpa)
> ./connect-service INTELTEST_WPA acdc123456 wpa			(in case of wpa)
> 
> Extract code
> if (len(sys.argv) < 2):
>         print "Usage: %s <ssid> [passphrase] [security]" % (sys.argv[0])
>         sys.exit(1)

I really don't see your issue here. The script just works fine for me. I
must be missing something obvious, but the > 3 check is correct.

You know that len(sys.argv)=1 means no parameters. Since sys.argv[0] is
the actual program name.

Regards

Marcel





More information about the connman mailing list