Sophie

Sophie

distrib > Fedora > 13 > i386 > media > updates-src > by-pkgid > 7643f0c3f070d52835fec28a2433cbb9 > files > 10

euca2ools-1.3.1-10.fc13.src.rpm

Index: euca2ools-1.3/euca2ools/euca2ools/__init__.py
===================================================================
--- euca2ools-1.3.orig/euca2ools/euca2ools/__init__.py
+++ euca2ools-1.3/euca2ools/euca2ools/__init__.py
@@ -224,12 +224,13 @@ devpts          /dev/pts      devpts   g
         tunecmd = [ ]
         if fs_type.startswith("ext"):
             mkfs = [ mkfs_prog , '-F', image_path ]
-            if uuid: mkfs.extend([ '-U', uuid ])
+            if uuid:
+                tunecmd = [ 'tune2fs', '-U', uuid, image_path ]
             if label: mkfs.extend([ '-L', label ])
         elif fs_type == "xfs":
             mkfs = [ mkfs_prog , image_path ]
             if label: mkfs.extend([ '-L', label ])
-            tunecmd = [ 'xfs_admin', '-U', uuid ]
+            tunecmd = [ 'xfs_admin', '-U', uuid, image_path ]
 
         elif fs_type == "btrfs":
             if uuid: raise(UnsupportedException("btrfs with uuid not supported"))
@@ -245,7 +246,7 @@ devpts          /dev/pts      devpts   g
 
         makefs_cmd = Popen(mkfs,PIPE).communicate()[0]
 
-        if len(tunecmd):
+        if len(tunecmd) > 0:
             Util().check_prerequisite_command(tunecmd[0])
             tune_cmd = Popen(tunecmd,PIPE).communicate()[0]