Fix bad indents
authorHuang Hao <hao.h.huang@intel.com>
Tue, 19 Feb 2013 05:30:14 +0000 (13:30 +0800)
committerGerrit Code Review <gerrit2@otctools.jf.intel.com>
Tue, 19 Feb 2013 06:18:52 +0000 (22:18 -0800)
Change-Id: I4bd330957aeaeaae8367aafdeffd2f511d479077

mic/bootstrap.py
mic/chroot.py
mic/imager/livecd.py
mic/imager/liveusb.py
mic/imager/raw.py
mic/pluginbase.py
mic/utils/misc.py
mic/utils/partitionedfs.py
mic/utils/proxy.py

index 0d43d47..598dcbf 100644 (file)
@@ -147,7 +147,7 @@ class MiniBackend(object):
             return
 
         if prog == "<lua>":
-             prog = "/usr/bin/lua"
+            prog = "/usr/bin/lua"
 
         tmpdir = os.path.join(self.rootdir, "tmp")
         if not os.path.exists(tmpdir):
index ce62639..d15fdf4 100644 (file)
@@ -56,7 +56,7 @@ def check_bind_mounts(chrootdir, bindmounts):
 
         srcdst = mount.split(":")
         if len(srcdst) == 1:
-           srcdst.append("none")
+            srcdst.append("none")
 
         if not os.path.isdir(srcdst[0]):
             return False
@@ -113,12 +113,12 @@ def setup_chrootenv(chrootdir, bindmounts = None, mountparent = True):
             srcdst = mount.split(":")
             srcdst[0] = os.path.abspath(os.path.expanduser(srcdst[0]))
             if len(srcdst) == 1:
-               srcdst.append("none")
+                srcdst.append("none")
 
             # if some bindmount is not existed, but it's created inside
             # chroot, this is not expected
             if not os.path.exists(srcdst[0]):
-               os.makedirs(srcdst[0])
+                os.makedirs(srcdst[0])
 
             if not os.path.isdir(srcdst[0]):
                 continue
index 29d95de..3e54e7d 100644 (file)
@@ -261,7 +261,7 @@ class LiveImageCreatorBase(LoopImageCreator):
         if isohybrid:
             args = [isohybrid, "-partok", iso ]
             if runner.show(args) != 0:
-               raise CreatorError("Hybrid ISO creation failed!")
+                raise CreatorError("Hybrid ISO creation failed!")
 
         self.__implant_md5sum(iso)
 
index dcbf2bf..bb8e225 100644 (file)
@@ -215,7 +215,7 @@ class LiveUSBImageCreator(LiveCDImageCreator):
                             homefile]
                     rc = runner.show(args)
                     if rc:
-                         raise CreatorError("Can't tune2fs home file")
+                        raise CreatorError("Can't tune2fs home file")
 
             if fstype == "vfat" or fstype == "msdos":
                 syslinuxcmd = fs_related.find_binary_path("syslinux")
index 462a7ea..72a230a 100644 (file)
@@ -85,9 +85,9 @@ class RawImageCreator(BaseImageCreator):
                     break
 
             if self.use_uuid and p['uuid']:
-               device = "UUID=%s" % p['uuid']
+                device = "UUID=%s" % p['uuid']
             else:
-               device = "/dev/%s%-d" % (p['disk_name'], p['num'])
+                device = "/dev/%s%-d" % (p['disk_name'], p['num'])
 
             s += "%(device)s  %(mountpoint)s  %(fstype)s  %(fsopts)s 0 0\n" % {
                'device': device,
@@ -161,7 +161,7 @@ class RawImageCreator(BaseImageCreator):
                                    "specified in partition line of ks file")
 
             if not parts[i].fstype:
-                 raise CreatorError("Failed to create disks, no --fstype "
+                raise CreatorError("Failed to create disks, no --fstype "
                                     "specified in partition line of ks file")
 
             self._disk_names.append(disk_name)
@@ -371,7 +371,7 @@ class RawImageCreator(BaseImageCreator):
             misc.packing(dst, self.__imgdir)
         else:
             msger.debug("moving disks to stage location")
-           for imgfile in os.listdir(self.__imgdir):
+            for imgfile in os.listdir(self.__imgdir):
                 src = os.path.join(self.__imgdir, imgfile)
                 dst = os.path.join(self._outdir, imgfile)
                 msger.debug("moving %s to %s" % (src,dst))
index cf98cd7..eb4a0ad 100644 (file)
@@ -27,11 +27,11 @@ class _Plugin(object):
                 cls.plugins = {}
 
             elif 'mic_plugin_type' in attrs:
-                    if attrs['mic_plugin_type'] not in cls.plugins:
-                        cls.plugins[attrs['mic_plugin_type']] = {}
+                if attrs['mic_plugin_type'] not in cls.plugins:
+                    cls.plugins[attrs['mic_plugin_type']] = {}
 
             elif hasattr(cls, 'mic_plugin_type') and 'name' in attrs:
-                    cls.plugins[cls.mic_plugin_type][attrs['name']] = cls
+                cls.plugins[cls.mic_plugin_type][attrs['name']] = cls
 
         def show_plugins(cls):
             for cls in cls.plugins[cls.mic_plugin_type]:
index 83128fd..30022c9 100644 (file)
@@ -578,7 +578,7 @@ def get_metadata_from_repos(repos, cachedir):
 
         proxies = None
         if proxy:
-           proxies = {str(baseurl.split(":")[0]):str(proxy)}
+            proxies = {str(baseurl.split(":")[0]):str(proxy)}
 
         makedirs(os.path.join(cachedir, reponame))
         url = os.path.join(baseurl, "repodata/repomd.xml")
@@ -709,7 +709,7 @@ def get_arch(repometadata):
                         continue
                 j += 1
             if need_append:
-                 uniq_arch.append(archlist[i])
+                uniq_arch.append(archlist[i])
 
         return uniq_arch
 
index 32e63ea..51294ec 100644 (file)
@@ -367,7 +367,7 @@ class PartitionedMount(Mount):
             # Strip trailing blank and mask verbose output
             i = 0
             while i < len(kpartxOutput) and kpartxOutput[i][0:4] != "loop":
-               i = i + 1
+                i = i + 1
             kpartxOutput = kpartxOutput[i:]
 
             # Quick sanity check that the number of partitions matches
index 136d5c0..91451a2 100644 (file)
@@ -53,16 +53,16 @@ def _set_proxies(proxy = None, no_proxy = None):
     _my_noproxy = None
     proxies = []
     if proxy:
-       proxies.append(("http_proxy", proxy))
+        proxies.append(("http_proxy", proxy))
     if no_proxy:
-       proxies.append(("no_proxy", no_proxy))
+        proxies.append(("no_proxy", no_proxy))
 
     # Get proxy settings from environment if not provided
     if not proxy and not no_proxy:
-       proxies = os.environ.items()
+        proxies = os.environ.items()
 
-       # Remove proxy env variables, urllib2 can't handle them correctly
-       unset_proxy_environ()
+        # Remove proxy env variables, urllib2 can't handle them correctly
+        unset_proxy_environ()
 
     for name, value in proxies:
         name = name.lower()