Fix instance import net option
authorIustin Pop <iustin@google.com>
Tue, 4 Aug 2009 12:33:37 +0000 (14:33 +0200)
committerIustin Pop <iustin@google.com>
Tue, 4 Aug 2009 13:27:12 +0000 (15:27 +0200)
This is identical to dc30b0e4 but applied to gnt-backup. Thanks to user
ocaner for catching it.

Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>

scripts/gnt-backup

index e78abba..467b37d 100755 (executable)
@@ -102,7 +102,7 @@ def ImportInstance(opts, args):
     except ValueError, err:
       raise errors.OpPrereqError("Invalid NIC index passed: %s" % str(err))
     nics = [{}] * nic_max
-    for nidx, ndict in opts.nics.items():
+    for nidx, ndict in opts.nics:
       nidx = int(nidx)
       nics[nidx] = ndict
   elif opts.no_nics: