summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorHuang Hao <hao.h.huang@intel.com>2013-02-27 15:10:35 +0800
committerHuang Hao <hao.h.huang@intel.com>2013-02-27 15:10:35 +0800
commit25fd049b003bb29b6e006135486076360e2503a0 (patch)
tree5c76aab109fcbdd714c4566e94136cf7b09a03bd /plugins
parentb3eafc14828841d3e5cfee40cb782fe110a2361e (diff)
downloadmic-25fd049b003bb29b6e006135486076360e2503a0.tar.gz
mic-25fd049b003bb29b6e006135486076360e2503a0.tar.bz2
mic-25fd049b003bb29b6e006135486076360e2503a0.zip
Fix bad indentations.
Change-Id: I6a1b15a130576c87a85db864ec3997b7c3005f05
Diffstat (limited to 'plugins')
-rw-r--r--plugins/backend/yumpkgmgr.py6
-rwxr-xr-xplugins/backend/zypppkgmgr.py8
-rw-r--r--plugins/imager/fs_plugin.py25
-rw-r--r--plugins/imager/livecd_plugin.py4
-rw-r--r--plugins/imager/liveusb_plugin.py4
5 files changed, 23 insertions, 24 deletions
diff --git a/plugins/backend/yumpkgmgr.py b/plugins/backend/yumpkgmgr.py
index 95690c6..955f813 100644
--- a/plugins/backend/yumpkgmgr.py
+++ b/plugins/backend/yumpkgmgr.py
@@ -78,12 +78,12 @@ class MyYumRepository(yum.yumRepo.YumRepository):
proxy = None
if url:
- proxy = get_proxy_for(url)
+ proxy = get_proxy_for(url)
else:
- proxy = get_proxy_for(self.urls[0])
+ proxy = get_proxy_for(self.urls[0])
if proxy:
- self.proxy = str(proxy)
+ self.proxy = str(proxy)
size = int(size) if size else None
rvalue = super(MyYumRepository, self)._getFile(url,
diff --git a/plugins/backend/zypppkgmgr.py b/plugins/backend/zypppkgmgr.py
index 0d02ad8..16ba467 100755
--- a/plugins/backend/zypppkgmgr.py
+++ b/plugins/backend/zypppkgmgr.py
@@ -278,9 +278,9 @@ class Zypp(BackendPlugin):
return True;
else:
if startx and name.endswith(pkg[1:]):
- return True;
+ return True;
if endx and name.startswith(pkg[:-1]):
- return True;
+ return True;
return False;
@@ -883,8 +883,8 @@ class Zypp(BackendPlugin):
def _add_prob_flags(self, *flags):
for flag in flags:
- if flag not in self.probFilterFlags:
- self.probFilterFlags.append(flag)
+ if flag not in self.probFilterFlags:
+ self.probFilterFlags.append(flag)
def get_proxies(self, pobj):
if not pobj:
diff --git a/plugins/imager/fs_plugin.py b/plugins/imager/fs_plugin.py
index 8a5a548..8e758db 100644
--- a/plugins/imager/fs_plugin.py
+++ b/plugins/imager/fs_plugin.py
@@ -129,16 +129,15 @@ class FsPlugin(ImagerPlugin):
@classmethod
def do_chroot(self, target, cmd=[]):#chroot.py parse opts&args
- try:
- if len(cmd) != 0:
- cmdline = ' '.join(cmd)
- else:
- cmdline = "/bin/bash"
- envcmd = fs_related.find_binary_inchroot("env", target)
- if envcmd:
- cmdline = "%s HOME=/root %s" % (envcmd, cmdline)
- chroot.chroot(target, None, cmdline)
- finally:
- chroot.cleanup_after_chroot("dir", None, None, None)
- return 1
-
+ try:
+ if len(cmd) != 0:
+ cmdline = ' '.join(cmd)
+ else:
+ cmdline = "/bin/bash"
+ envcmd = fs_related.find_binary_inchroot("env", target)
+ if envcmd:
+ cmdline = "%s HOME=/root %s" % (envcmd, cmdline)
+ chroot.chroot(target, None, cmdline)
+ finally:
+ chroot.cleanup_after_chroot("dir", None, None, None)
+ return 1
diff --git a/plugins/imager/livecd_plugin.py b/plugins/imager/livecd_plugin.py
index 93479e2..d24ef59 100644
--- a/plugins/imager/livecd_plugin.py
+++ b/plugins/imager/livecd_plugin.py
@@ -175,7 +175,7 @@ class LiveCDPlugin(ImagerPlugin):
try:
subprocess.call(args, preexec_fn = instance._chroot)
except OSError, (err, msg):
- raise errors.CreatorError("Failed to execute /usr/libexec/mkliveinitrd: %s" % msg)
+ raise errors.CreatorError("Failed to execute /usr/libexec/mkliveinitrd: %s" % msg)
def __run_post_cleanups(instance):
kernelver = instance._get_kernel_versions().values()[0][0]
@@ -184,7 +184,7 @@ class LiveCDPlugin(ImagerPlugin):
try:
subprocess.call(args, preexec_fn = instance._chroot)
except OSError, (err, msg):
- raise errors.CreatorError("Failed to run post cleanups: %s" % msg)
+ raise errors.CreatorError("Failed to run post cleanups: %s" % msg)
convertoropts = configmgr.convert
convertoropts['name'] = os.path.splitext(os.path.basename(base_on))[0]
diff --git a/plugins/imager/liveusb_plugin.py b/plugins/imager/liveusb_plugin.py
index f239a1a..7aa8927 100644
--- a/plugins/imager/liveusb_plugin.py
+++ b/plugins/imager/liveusb_plugin.py
@@ -177,7 +177,7 @@ class LiveUSBPlugin(ImagerPlugin):
subprocess.call(args, preexec_fn = instance._chroot)
except OSError, (err, msg):
- raise errors.CreatorError("Failed to execute /usr/libexec/mkliveinitrd: %s" % msg)
+ raise errors.CreatorError("Failed to execute /usr/libexec/mkliveinitrd: %s" % msg)
def __run_post_cleanups(instance):
kernelver = instance._get_kernel_versions().values()[0][0]
@@ -186,7 +186,7 @@ class LiveUSBPlugin(ImagerPlugin):
try:
subprocess.call(args, preexec_fn = instance._chroot)
except OSError, (err, msg):
- raise errors.CreatorError("Failed to run post cleanups: %s" % msg)
+ raise errors.CreatorError("Failed to run post cleanups: %s" % msg)
convertoropts = configmgr.convert
convertoropts['name'] = os.path.splitext(os.path.basename(base_on))[0]