Some refactoring. Move the Config early in the __main__
This commit is contained in:
parent
c96ba25075
commit
c0e9e2aa30
@ -38,7 +38,6 @@ class ToTestBase(object):
|
||||
def __init__(self, project, dryrun):
|
||||
self.project = project
|
||||
self.dryrun = dryrun
|
||||
Config('openSUSE:%s' % project)
|
||||
self.api = StagingAPI(osc.conf.config['apiurl'], project='openSUSE:%s' % project)
|
||||
self.known_failures = self.known_failures_from_dashboard(project)
|
||||
|
||||
@ -113,7 +112,7 @@ class ToTestBase(object):
|
||||
def overall_result(self, snapshot):
|
||||
"""Analyze the openQA jobs of a given snapshot Returns a QAResult"""
|
||||
|
||||
if snapshot == None:
|
||||
if snapshot is None:
|
||||
return QA_FAILED
|
||||
|
||||
jobs = self.find_openqa_results(snapshot)
|
||||
@ -382,7 +381,8 @@ class ToTestFactory(ToTestBase):
|
||||
|
||||
|
||||
class ToTest132(ToTestBase):
|
||||
main_products = ['_product:openSUSE-dvd5-dvd-i586',
|
||||
main_products = [
|
||||
'_product:openSUSE-dvd5-dvd-i586',
|
||||
'_product:openSUSE-dvd5-dvd-x86_64',
|
||||
'_product:openSUSE-cd-mini-i586',
|
||||
'_product:openSUSE-cd-mini-x86_64',
|
||||
@ -421,7 +421,8 @@ if __name__ == '__main__':
|
||||
parser.print_help()
|
||||
exit(-1)
|
||||
|
||||
#osc.conf.get_config()
|
||||
osc.conf.get_config()
|
||||
Config('openSUSE:%s' % args.project)
|
||||
# osc.conf.config['debug'] = True
|
||||
|
||||
totest = totest_class[args.project](args.project, args.dryrun)
|
||||
|
Loading…
x
Reference in New Issue
Block a user