mirror of
https://git.yoctoproject.org/poky
synced 2026-02-20 08:29:42 +01:00
wic: code cleanup
Fixed indentation, unused imports, trailing lines etc. [YOCTO #10619] (From OE-Core rev: 5fa7768bfb4b6d464c6a812822b0665f52e7bea4) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
1f7ce90af6
commit
653aaea3cc
@@ -77,18 +77,15 @@ def _exec_cmd(cmd_and_args, as_shell=False, catch=3):
|
||||
msger.debug("_exec_cmd: output for %s (rc = %d): %s" % \
|
||||
(cmd_and_args, ret, out))
|
||||
|
||||
return (ret, out)
|
||||
return ret, out
|
||||
|
||||
|
||||
def exec_cmd(cmd_and_args, as_shell=False, catch=3):
|
||||
"""
|
||||
Execute command, catching stderr, stdout
|
||||
|
||||
Exits if rc non-zero
|
||||
Execute command, return output
|
||||
"""
|
||||
ret, out = _exec_cmd(cmd_and_args, as_shell, catch)
|
||||
return _exec_cmd(cmd_and_args, as_shell, catch)[1]
|
||||
|
||||
return out
|
||||
|
||||
def exec_native_cmd(cmd_and_args, native_sysroot, catch=3, pseudo=""):
|
||||
"""
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
import os
|
||||
from wic import msger
|
||||
from wic.utils.errors import ImageError
|
||||
from wic.utils.misc import exec_cmd, exec_native_cmd
|
||||
from wic.utils.misc import exec_native_cmd
|
||||
from wic.filemap import sparse_copy
|
||||
|
||||
# Overhead of the MBR partitioning scheme (just one sector)
|
||||
@@ -350,10 +350,9 @@ class Image():
|
||||
if self.disks:
|
||||
for dev in self.disks:
|
||||
disk = self.disks[dev]
|
||||
try:
|
||||
if hasattr(disk['disk'], 'cleanup'):
|
||||
disk['disk'].cleanup()
|
||||
except:
|
||||
pass
|
||||
|
||||
# remove partition images
|
||||
for image in self.partimages:
|
||||
if os.path.isfile(image):
|
||||
|
||||
Reference in New Issue
Block a user