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):
srcdst = mount.split(":")
if len(srcdst) == 1:
- srcdst.append("none")
+ srcdst.append("none")
if not os.path.isdir(srcdst[0]):
return False
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
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)
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")
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,
"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)
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))
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]:
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")
continue
j += 1
if need_append:
- uniq_arch.append(archlist[i])
+ uniq_arch.append(archlist[i])
return uniq_arch
# 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
_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()