
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 04/05/2013 07:10 AM, Daniel P. Berrange wrote:
On Wed, Apr 03, 2013 at 07:17:29PM -0400, Dan Walsh wrote:
This way we can share common methods between the ServiceContainer and the InteractiveContainer (Patch to be added) --- bin/virt-sandbox-service | 754 ++++++++++++++++++++++++----------------------- 1 file changed, 385 insertions(+), 369 deletions(-)
container.set_copy(args.copy) - if args.network: - for net in args.network: - container.add_network(net) + for net in args.network: + container.add_network(net)
Hmm, I had the 'if args.network' because this would raise an error about 'args.network' not existing, if no --network args were provided on the command line. Are you sure this still works when no --network args are used ?
ACK if this issue is not a problem anymore, or if this chunk is reverted.
Daniel
This command initializes the "network" to [], the previous code did not specify a default which implies default=None. My code added a default to an empty list which is why the code above works. - - parser.add_argument("-N", "--network", dest="network", - - action=SetNet, - - help=_("Specify the network configuration")) + parser.add_argument("-n", "--network", dest="network", + action=SetNet, default=[], + help=_("Specify the network configuration")) -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.13 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iEYEARECAAYFAlFf+4gACgkQrlYvE4MpobMM1ACfZAawIVppXng3pGd3KBxUTEHI B5cAniiPBz6DAglamMzv+wSYK296jj/E =v9ro -----END PGP SIGNATURE-----