Fix lint errors
authorHelga Velroyen <helgav@google.com>
Mon, 7 Oct 2013 14:01:06 +0000 (16:01 +0200)
committerHelga Velroyen <helgav@google.com>
Mon, 7 Oct 2013 14:13:37 +0000 (16:13 +0200)
This fixes a couple of lint errors that I missed with
the patch "Fix upgrade and downgrade regarding
disk.dev_type".

Signed-off-by: Helga Velroyen <helgav@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>

tools/cfgupgrade

index 7141e9b..afd1d70 100755 (executable)
@@ -62,7 +62,7 @@ DOWNGRADE_MINOR = 8
 # (mapping differing old LD_* constants to new DT_* constants)
 DEV_TYPE_OLD_NEW = {"lvm": constants.DT_PLAIN, "drbd8": constants.DT_DRBD8}
 # (mapping differing new DT_* constants to old LD_* constants)
-DEV_TYPE_NEW_OLD = {v:k for k,v in DEV_TYPE_OLD_NEW.items()}
+DEV_TYPE_NEW_OLD = dict((v, k) for k, v in DEV_TYPE_OLD_NEW.items())
 
 
 class Error(Exception):
@@ -387,6 +387,7 @@ def DowngradeDiskDevType(disk):
   """Downgrades the disks' device type."""
   ChangeDiskDevType(disk, DEV_TYPE_NEW_OLD)
 
+
 def DowngradeDisks(disks, owner):
   for disk in disks:
     # Remove spindles to downgrade to 2.8