示例#1
0
    def get_bugzilla(self, username=None, password=None):
        username = username or self.bugzilla_username or '*****@*****.**'
        password = password or self.bugzilla_password or 'password'

        return Bugzilla(self.bugzilla_url,
                        username=username,
                        password=password)
    def __init__(self, context):
        if 'BUGZILLA_URL' in os.environ:
            self.base_url = os.environ['BUGZILLA_URL']
            username = os.environ['BUGZILLA_USERNAME']
            password = os.environ['BUGZILLA_PASSWORD']

            self.b = Bugzilla(self.base_url, username=username, password=password)

        else:
            raise Exception('Do not know which Bugzilla instance to talk to. '
                    'Set BUGZILLA_URL or MOZREVIEW_HOME environment variables.')
示例#3
0
    def __init__(self, context):
        if 'BUGZILLA_URL' in os.environ:
            self.base_url = os.environ['BUGZILLA_URL']
            username = os.environ['BUGZILLA_USERNAME']
            password = os.environ['BUGZILLA_PASSWORD']

            self.b = Bugzilla(self.base_url,
                              username=username,
                              password=password)

        elif 'MOZREVIEW_HOME' in os.environ:
            # Delay import to facilitate module use in limited virtualenvs.
            from vcttesting.mozreview import MozReview

            mr = MozReview(os.environ['MOZREVIEW_HOME'])
            username = os.environ.get('BUGZILLA_USERNAME')
            password = os.environ.get('BUGZILLA_PASSWORD')

            self.b = mr.get_bugzilla(username=username, password=password)

        else:
            raise Exception(
                'Do not know which Bugzilla instance to talk to. '
                'Set BUGZILLA_URL or MOZREVIEW_HOME environment variables.')