Did I find the right examples for you? yes no

All Samples(230)  |  Call(210)  |  Derive(0)  |  Import(20)

src/o/e/oe-core-HEAD/scripts/lib/mic/utils/misc.py   oe-core(Download)
 
from mic import msger
from mic.utils.errors import CreatorError, SquashfsError
from mic.utils.fs_related import find_binary_path, makedirs
from mic.utils.proxy import get_proxy_for
    }
    if method not in comp_map:
        raise CreatorError("Unsupport compress format: %s, valid values: %s"
                           % (method, ','.join(comp_map.keys())))
    cmd = find_binary_path(comp_map[method])
    rc = runner.show([cmd, "-f", fpath])
    if rc:
        raise CreatorError("Failed to %s file: %s" % (comp_map[method], fpath))
        ext = ".tar" + ext
    if ext not in pack_formats:
        raise CreatorError("Unsupport pack format: %s, valid values: %s"
                           % (ext, ','.join(pack_formats.keys())))
    func = pack_formats[ext]
    freesize = get_filesystem_avail(dst)
    if srcsize > freesize:
        raise CreatorError("space on %s(%s) is not enough for about %s files"
                           % (dst, human_size(freesize), human_size(srcsize)))
 

src/o/e/oe-core-HEAD/scripts/lib/mic/imager/liveusb.py   oe-core(Download)
from mic import msger
from mic.utils import misc, fs_related, runner
from mic.utils.errors import CreatorError, MountError
from mic.utils.partitionedfs import PartitionedMount
from mic.imager.livecd import LiveCDImageCreator
        if fstype == 'vfat':
            if overlaysizemb > 2047:
                raise CreatorError("Can't have an overlay of 2048MB or "
                                   "greater on VFAT")
 
            if homesizemb > 2047:
                raise CreatorError("Can't have an home overlay of 2048MB or "
 
            if swapsizemb > 2047:
                raise CreatorError("Can't have an swap overlay of 2048MB or "
                                   "greater on VFAT")
 
            rc = runner.show(args)
            if rc:
                raise CreatorError("Can't copy isolinux directory %s" \
                                   % (isodir + "/isolinux/*"))
 

src/o/e/oe-core-HEAD/scripts/lib/mic/utils/rpmmisc.py   oe-core(Download)
 
from mic import msger
from mic.utils.errors import CreatorError
from mic.utils.proxy import get_proxy_for
from mic.utils import runner
    import urllib2 as u2
    import httplib
    from mic.utils.errors import CreatorError
 
    def _check_and_download_url(u2opener, url, savepath):
                return None
            else:
                raise CreatorError(httperror)
        except OSError, oserr:
            if oserr.errno == 2:
                return None
            else:
                raise CreatorError(oserr)
                return None
            else:
                raise CreatorError(oserr)
        except u2.URLError, err:
            raise CreatorError(err)

src/o/e/oe-core-HEAD/scripts/lib/mic/plugins/backend/yumpkgmgr.py   oe-core(Download)
from mic.utils.grabber import TextProgress
from mic.utils.proxy import get_proxy_for
from mic.utils.errors import CreatorError
from mic.imager.baseimager import BaseImageCreator
 
                M2Crypto.SSL.Connection.clientPostConnectionCheck = None
            except ImportError, err:
                raise CreatorError("%s, please try to install python-m2crypto" % str(err))
 
        proxy = None
            return "No package(s) available to install"
        except yum.Errors.RepoError, e:
            raise CreatorError("Unable to download from repo : %s" % (e,))
        except yum.Errors.YumBaseError, e:
            raise CreatorError("Unable to install: %s" % (e,))
            return e
        except yum.Errors.RepoError, e:
            raise CreatorError("Unable to download from repo : %s" % (e,))
        except yum.Errors.YumBaseError, e:
            raise CreatorError("Unable to install: %s" % (e,))

src/m/i/mic-HEAD/mic/imager/liveusb.py   mic(Download)
from mic import msger
from mic.utils import misc, fs_related, runner
from mic.utils.errors import CreatorError, MountError
from mic.utils.partitionedfs import PartitionedMount
 
        if fstype == 'vfat':
            if overlaysizemb > 2047:
                raise CreatorError("Can't have an overlay of 2048MB or "
                                   "greater on VFAT")
 
            if homesizemb > 2047:
                raise CreatorError("Can't have an home overlay of 2048MB or "
 
            if swapsizemb > 2047:
                raise CreatorError("Can't have an swap overlay of 2048MB or "
                                   "greater on VFAT")
 
            rc = runner.show(args)
            if rc:
                raise CreatorError("Can't copy isolinux directory %s" \
                                   % (isodir + "/isolinux/*"))
 

src/o/e/oe-core-HEAD/scripts/lib/mic/creator.py   oe-core(Download)
 
        if not os.path.exists(args[0]):
            raise errors.CreatorError("Can't find the file: %s" % args[0])
 
        with open(args[0], 'r') as rf:

src/o/e/oe-core-HEAD/scripts/lib/mic/imager/baseimager.py   oe-core(Download)
from mic import kickstart
from mic import msger
from mic.utils.errors import CreatorError, Abort
from mic.utils import misc, runner, fs_related as fs
 
    def __get_instroot(self):
        if self.__builddir is None:
            raise CreatorError("_instroot is not valid before calling mount()")
        return self.__builddir + "/install_root"
    _instroot = property(__get_instroot)
    def __get_outdir(self):
        if self.__builddir is None:
            raise CreatorError("_outdir is not valid before calling mount()")
        return self.__builddir + "/out"
    _outdir = property(__get_outdir)
                                               prefix = "imgcreate-")
        except OSError, (err, msg):
            raise CreatorError("Failed create build directory in %s: %s" %
                               (self.tmpdir, msg))
 
    def __sanity_check(self):
        """Ensure that the config we've been given is sane."""
        if not (kickstart.get_packages(self.ks) or
                kickstart.get_groups(self.ks)):
            raise CreatorError("No packages or groups specified")

src/o/e/oe-core-HEAD/scripts/lib/mic/plugins/imager/liveusb_plugin.py   oe-core(Download)
 
        if not pkgmgr:
            raise errors.CreatorError("Can't find backend: %s, "
                                      "available choices: %s" %
                                      (creatoropts['pkgmgr'],
            myDiskMount = fs_related.ExtDiskMount
        else:
            raise errors.CreatorError("Unsupported filesystem type: %s" % fstype)
 
        extmnt = misc.mkdtemp()
            chroot.chroot(extmnt, None, cmdline)
        except:
            raise errors.CreatorError("Failed to chroot to %s." %target)
        finally:
            chroot.cleanup_after_chroot("img", extloop, os_image_dir, extmnt)
 
            except OSError, (err, msg):
                raise errors.CreatorError("Failed to execute /usr/libexec/mkliveinitrd: %s" % msg)
 
        def __run_post_cleanups(instance):
                subprocess.call(args, preexec_fn = instance._chroot)
            except OSError, (err, msg):
                raise errors.CreatorError("Failed to run post cleanups: %s" % msg)
 
        convertoropts = configmgr.convert

src/o/e/oe-core-HEAD/scripts/lib/mic/plugins/imager/livecd_plugin.py   oe-core(Download)
 
        if not pkgmgr:
            raise errors.CreatorError("Can't find backend: %s, "
                                      "available choices: %s" %
                                      (creatoropts['pkgmgr'],
            myDiskMount = fs_related.ExtDiskMount
        else:
            raise errors.CreatorError("Unsupported filesystem type: %s" % fstype)
 
        extmnt = misc.mkdtemp()
            chroot.chroot(extmnt, None, cmdline)
        except:
            raise errors.CreatorError("Failed to chroot to %s." %target)
        finally:
            chroot.cleanup_after_chroot("img", extloop, os_image_dir, extmnt)
                subprocess.call(args, preexec_fn = instance._chroot)
            except OSError, (err, msg):
                raise errors.CreatorError("Failed to execute /usr/libexec/mkliveinitrd: %s" % msg)
 
        def __run_post_cleanups(instance):
                subprocess.call(args, preexec_fn = instance._chroot)
            except OSError, (err, msg):
                raise errors.CreatorError("Failed to run post cleanups: %s" % msg)
 
        convertoropts = configmgr.convert

src/o/e/oe-core-HEAD/scripts/lib/mic/imager/loop.py   oe-core(Download)
 
from mic import kickstart, msger
from mic.utils.errors import CreatorError, MountError
from mic.utils import misc, runner, fs_related as fs
from mic.imager.baseimager import BaseImageCreator
    def __get_image(self):
        if self.__imgdir is None:
            raise CreatorError("_image is not valid before calling mount()")
        return os.path.join(self.__imgdir, self._img_name)
    #The location of the image file.
    def __set_blocksize(self, val):
        if self._instloops:
            raise CreatorError("_blocksize must be set before calling mount()")
        try:
            self.__blocksize = int(val)
        except ValueError:
            raise CreatorError("'%s' is not a valid integer value "
    def __set_fstype(self, val):
        if val != "ext2" and val != "ext3":
            raise CreatorError("Unknown _fstype '%s' supplied" % val)
        self.__fstype = val
    #The type of filesystem used for the image.

  1 | 2 | 3 | 4  Next