How to use the pyalpm.alpmversion function in pyalpm

To help you get started, we’ve selected a few pyalpm examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github archlinux / pyalpm / test / test_alpm.py View on Github external
def test_alpm_version():
    assert pyalpm.alpmversion() != ''
github Antergos / Cnchi / cnchi / cnchi.py View on Github external
def check_pyalpm_version():
    """ Checks python alpm binding and alpm library versions """
    try:
        import pyalpm

        txt = _("Using pyalpm v{0} as interface to libalpm v{1}")
        txt = txt.format(pyalpm.version(), pyalpm.alpmversion())
        logging.info(txt)
    except (NameError, ImportError) as err:
        logging.error(err)
        sys.exit(1)

    return True
github Antergos / Cnchi / src / cnchi.py View on Github external
def check_pyalpm_version():
        """ Checks python alpm binding and alpm library versions """
        try:
            import pyalpm

            txt = "Using pyalpm v{0} as interface to libalpm v{1}"
            txt = txt.format(pyalpm.version(), pyalpm.alpmversion())
            logging.info(txt)
        except (NameError, ImportError) as err:
            try:
                show.error(None, err)
                logging.error(err)
            except ImportError as import_error:
                logging.error(import_error)
            return False

        return True
github archlinux / pyalpm / pycman / action_version.py View on Github external
def main(args):
	print(VERSION_STRING % (pyalpm.version(), pyalpm.alpmversion()))
	return 2
github Antergos / Cnchi / cnchi / cnchiOLD.py View on Github external
def check_pyalpm_version():
    """ Checks python alpm binding and alpm library versions """
    try:
        import pyalpm

        txt = "Using pyalpm v{0} as interface to libalpm v{1}"
        txt = txt.format(pyalpm.version(), pyalpm.alpmversion())
        logging.info(txt)
    except (NameError, ImportError) as err:
        try:
            import show_message as show
            show.error(None, err)
        except ImportError as import_error:
            logging.error(import_error)
        finally:
            logging.error(err)
            return False

    return True