White space / consistent usage of spaces / indentation of 4 fixes

This commit is contained in:
2017-10-17 09:10:17 +02:00
parent d07e2cdc4a
commit 1cec490d54
11 changed files with 66 additions and 47 deletions

View File

@@ -100,34 +100,43 @@ Report = namedtuple('Report', ('src_project', 'src_package', 'src_rev', 'dst_pro
# report for a single library
LibResult = namedtuple('LibResult', ('src_repo', 'src_lib', 'dst_repo', 'dst_lib', 'arch', 'htmlreport', 'result'))
class DistUrlMismatch(Exception):
def __init__(self, disturl, md5):
Exception.__init__(self)
self.msg = 'disturl mismatch has: %s wanted ...%s'%(disturl, md5)
def __str__(self):
return self.msg
class SourceBroken(Exception):
def __init__(self, project, package):
Exception.__init__(self)
self.msg = '%s/%s has broken sources, needs rebase'%(project, package)
def __str__(self):
return self.msg
class NoBuildSuccess(Exception):
def __init__(self, project, package, md5):
Exception.__init__(self)
self.msg = '%s/%s(%s) had no successful build'%(project, package, md5)
def __str__(self):
return self.msg
class NotReadyYet(Exception):
def __init__(self, project, package, reason):
Exception.__init__(self)
self.msg = '%s/%s not ready yet: %s'%(project, package, reason)
def __str__(self):
return self.msg
class MissingDebugInfo(Exception):
def __init__(self, missing_debuginfo):
Exception.__init__(self)
@@ -137,23 +146,29 @@ class MissingDebugInfo(Exception):
self.msg += "%s/%s %s/%s %s %s\n"%i
elif len(i) == 5:
self.msg += "%s/%s %s/%s %s\n"%i
def __str__(self):
return self.msg
class FetchError(Exception):
def __init__(self, msg):
Exception.__init__(self)
self.msg = msg
def __str__(self):
return self.msg
class MaintenanceError(Exception):
def __init__(self, msg):
Exception.__init__(self)
self.msg = msg
def __str__(self):
return self.msg
class LogToDB(logging.Filter):
def __init__(self, session):
self.session = session
@@ -166,6 +181,7 @@ class LogToDB(logging.Filter):
self.session.commit()
return True
class ABIChecker(ReviewBot.ReviewBot):
""" check ABI of library packages
"""

View File

@@ -48,6 +48,7 @@ class RemindedPackage(object):
self.reminded=reminded
self.bug=bug
self.remindCount=remindCount
def __str__(self):
return '{} {} {} {}'.format(self.firstfail, self.reminded, self.bug, self.remindCount)

View File

@@ -17,10 +17,12 @@ def _checker_check_dups(self, project, opts):
target = a.find('target')
type = a.attrib['type']
assert target != None
if target.attrib['project'] != project: continue
#print(id)
#ET.dump(target)
if not target.attrib.has_key('package'): continue
if target.attrib['project'] != project:
continue
# print(id)
# ET.dump(target)
if not target.attrib.has_key('package'):
continue
package = target.attrib['package']
if rqs.has_key(type + package):
[oldid, oldsource] = rqs[type + package]

View File

@@ -44,6 +44,7 @@ class AdiCommand:
Fore.CYAN + review['package'] + Fore.RESET,
review['request'])
return
if self.api.is_user_member_of(self.api.user, self.api.cstaging_group):
print query_project, Fore.GREEN + 'ready'
packages = []

View File

@@ -67,7 +67,6 @@ def rebuild_pkg_in_factory(package, prj, arch, testmode, code=None):
pkg = query['package']
u = osc.core.makeurl(osc.conf.config['apiurl'], ['build', prj], query=query)
# print u
if testmode != False:
print "Trigger rebuild for this package: " + u