Ejemplo n.º 1
0
Archivo: cli.py Proyecto: riag/eyapm
def eyapmcli(ctx, show_version):
    ctx.ensure_object(dict)

    if show_version:
        msg_list = []
        msg_list.append('eyapm   version is %s' % eyapm.__version__)
        msg_list.append('pyalpm  version is %s' % pyalpm.version())
        msg_list.append('libalpm version is %s' % pyalpm.alpmversion())
        print('\n'.join(msg_list))
Ejemplo n.º 2
0
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
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
Ejemplo n.º 4
0
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
Ejemplo n.º 5
0
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
Ejemplo n.º 6
0
 def get_versions(self):
     return (pyalpm.version(), pyalpm.alpmversion())
Ejemplo n.º 7
0
 def get_version(self):
     return "Cnchi running on pyalpm v%s - libalpm v%s" % (
         pyalpm.version(), pyalpm.alpmversion())
Ejemplo n.º 8
0
 def get_versions(self):
     return (pyalpm.version(), pyalpm.alpmversion())
Ejemplo n.º 9
0
 def get_version(self):
     return "Cnchi running on pyalpm v%s - libalpm v%s" % (pyalpm.version(), pyalpm.alpmversion())
Ejemplo n.º 10
0
def main(args):
	print(VERSION_STRING % (pyalpm.version(), pyalpm.alpmversion()))
	return 2
Ejemplo n.º 11
0
def test_alpm_version():
    assert pyalpm.alpmversion() != ''
Ejemplo n.º 12
0
def main(args):
    print(VERSION_STRING % (pyalpm.version(), pyalpm.alpmversion()))
    return 2