Code review comment for lp:~bladernr/checkbox/1128017-improve-network_check

Revision history for this message
Jeff Lane  (bladernr) wrote :

default is interpolated automatically IF you provide a default="foo" in the arg definition.

bladernr@klaatu:~/development/git-workspace/checkbox/scripts$ ./network_check -h
usage: network_check [-h] [-u URL] [-a]

optional arguments:
  -h, --help show this help message and exit
  -u URL, --url URL The target URL to try. Default is
                     http://cdimage.ubuntu.com
  -a, --auto Runs in Automated mode, with no visible output

note that it automatically converts %(default)s to "http://cdimage.ubuntu.com" which is set as the default here:

parser.add_argument('-u', '--url',
                        action='store',
                        default='http://cdimage.ubuntu.com',
                        help='The target URL to try. Default is %(default)s')

« Back to merge proposal