Subversion

helios_wp3

[/] [trunk/] [python/] [check-summary-soap.py] - Rev 236 Go to most recent revision

Compare with Previous - Blame


# Copyright Olivier Berger <olivier.berger@it-sudparis.eu> + Institut TELECOM, 2008
# developped in the frame of the HELIOS project (http://www.helios-platform.org/)
# License : GNU LGPL V3

# Output attributes of bugs given a list of bug numbers

# This program is meant to demonstrate an extension of the python
# 'btsutils' library made in order to validate the reuse of bits of
# bts-link which use a local copy of the Debian BTS database instead
# of doing SOAP requests

import sys

# import these bits from our extended version of the btsutils library
# (original in the Debian package 'python-btsutils' : http://bug-triage.alioth.debian.org/)

#from btsutils.debbugs import debbugs
#from btsutils.bug import Bug
from btsutils.debbugsloc import debbugsloc

# Import bits from bts-link

# Import the configuration (bts-link.cfg)
from btslinkutils import BTSLConfig as Cnf
# Import the debbugs interface from bts-link
import btslinkbts
bts = btslinkbts



# Program starts here
if __name__ == "__main__":

    if len(sys.argv) < 2:
        print "Usage: %s bug# bug# ..." % sys.argv[0]
        sys.exit(1)

    bugs = sys.argv[1:]

    # Instantiate a bts-link debbugs interface
    # requires that btslink.cfg points to the right place and contains
    # proper definition for the db-h debbugs database mirror (spool)
    btsi = bts.BtsInterface(Cnf)

    # Instantiate our btsutils.debbugs compliant interface
    spoolbts = debbugsloc(btsi)

    # display bugs properties
    for id in bugs:

        print
        print "processing bug : ",id
        btsbug = spoolbts.get(id)
        print btsbug
        

Powered by WebSVN v1.61