Commits

Rodrigo Bistolfi committed b7fedf2

automatic: fix indentation

Comments (0)

Files changed (1)

vinstall/controller/automatic.py

         install_media = self.config["install_media"]
         if install_media.is_iso():
             if not os.path.exists(install_media.path):
-                print "mount container here"
-		mntpoint = install_media.path.rsplit("/", 1)[0]
-		dev = mntpoint.replace("/mnt", "/dev")
-            	utils.mount(dev, mntpoint)
+                mntpoint = install_media.path.rsplit("/", 1)[0]
+                dev = mntpoint.replace("/mnt", "/dev")
+                utils.mount(dev, mntpoint)
             utils.mountiso(install_media.path, mountpoint)
         else:
             utils.mount(install_media.path, mountpoint, filesystem="auto")
         install_media = self.config["install_media"]
         version = install_media.config.get("general", "version")
         if "LIVE" in version:
-        	return True
+            return True
         return False
 
     def live_packages(self):
         """Install Linux image from a Live install media
         
         """
+        #XXX do not chdir without switching back to original working dir!
         install_media = self.config["install_media"]
         kernel_version = install_media.config.get("kernels", "sata")
         kernel_version = kernel_version.replace("\"", "")
         source = os.path.join('/mnt', 'SOURCE', 'boot', 'vmlinuz')
-        target = os.path.join('/mnt', 'TARGET', 'boot', 'vmlinuz-%s' %
-            kernel_version)
+        target = os.path.join('/mnt', 'TARGET', 'boot', 'vmlinuz-%s' % 
+                kernel_version)
         shutil.copyfile(source, target)
-	for rc in ("rc.S", "rc.M", "rc.K", "rc.local"):
-	    rcdir = os.path.join('/mnt', 'TARGET', 'etc', 'rc.d')
-	    source = os.path.join('%s.real' % rc)
-	    os.chdir(rcdir)
-	    os.remove(rc)
-	    os.symlink(source, rc)
+        for rc in ("rc.S", "rc.M", "rc.K", "rc.local"):
+            rcdir = os.path.join('/mnt', 'TARGET', 'etc', 'rc.d')
+            source = os.path.join('%s.real' % rc)
+            os.chdir(rcdir)
+            os.remove(rc)
+            os.symlink(source, rc)
 
     def fstab(self, disk):
         """Create and install a fstab file in disk