diff --git a/osc/build.py b/osc/build.py index 33e51bc7..27403b5f 100644 --- a/osc/build.py +++ b/osc/build.py @@ -188,12 +188,10 @@ class Buildinfo: self.pathes.append(node.get('project')+"/"+node.get('repository')) # a hash providing the matching URL for specific repos for newer OBS instances if node.get('url'): - url = node.get('url').replace('%', '%%') + baseurl = node.get('url').replace('%', '%%') if config['api_host_options'][apiurl]['downloadurl']: # Add the path element to the download url override. baseurl = config['api_host_options'][apiurl]['downloadurl'] + urlsplit(node.get('url'))[2] - else: - baseurl = node.get('url') self.urls[node.get('project')+"/"+node.get('repository')] = baseurl + '/%(arch)s/%(filename)s' self.vminstall_list = [ dep.name for dep in self.deps if dep.vminstall ] @@ -295,14 +293,9 @@ class Pac: def makeurls(self, cachedir, urllist): - - self.urllist = [] self.localdir = '%s/%s/%s/%s' % (cachedir, self.project, self.repository, self.arch) self.fullfilename = os.path.join(self.localdir, self.canonname) - - # remote URLs - for url in urllist: - self.urllist.append(url % self.mp) + self.urllist = [url % self.mp for url in urllist] def __str__(self): return self.name diff --git a/osc/conf.py b/osc/conf.py index b479c39d..54cb360f 100644 --- a/osc/conf.py +++ b/osc/conf.py @@ -323,11 +323,11 @@ apiurl = %(apiurl)s # extra packages to install when building packages locally (osc build) # this corresponds to osc build's -x option and can be overridden with that # -x '' can also be given on the command line to override this setting, or -# you can have an empty setting here. This global setting may leads to +# you can have an empty setting here. This global setting may leads to # dependency problems when the base distro is not providing the package. # => using server side definition via cli_debug_packages substitute rule is # recommended therefore. -#extra-pkgs = +#extra-pkgs = # build platform is used if the platform argument is omitted to osc build #build_repository = %(build_repository)s diff --git a/osc/core.py b/osc/core.py index e416fe81..31c15f4a 100644 --- a/osc/core.py +++ b/osc/core.py @@ -1556,7 +1556,7 @@ class Package: print('Transmitting file data', end=' ') filelist = self.__generate_commitlist(todo_send) sfilelist = self.__send_commitlog(msg, filelist, validate=True) - hash_entries = [e for e in sfilelist.findall('entry') if e.get('hash') is not None] + hash_entries = [e for e in sfilelist.findall('entry') if e.get('hash') is not None] if sfilelist.get('error') and hash_entries: name2elem = dict([(e.get('name'), e) for e in filelist.findall('entry')]) for entry in hash_entries: @@ -3746,7 +3746,7 @@ class metafile: class _URLFactory: # private class which might go away again... def __init__(self, delegate, force_supported=True): - self._delegate = delegate + self._delegate = delegate self._force_supported = force_supported def is_force_supported(self): @@ -6047,7 +6047,7 @@ def get_package_results(apiurl, project, package=None, wait=False, *args, **kwar if not wait or not waiting: break else: - yield xml + yield xml yield xml diff --git a/osc/util/packagequery.py b/osc/util/packagequery.py index 456b0f5c..e07a6bbe 100644 --- a/osc/util/packagequery.py +++ b/osc/util/packagequery.py @@ -158,8 +158,8 @@ class PackageQueryResult: epoch = self.epoch() if epoch is not None and epoch != 0: - evr = epoch + b":" + evr - return evr + evr = epoch + b":" + evr + return evr def cmp(a, b):