mirror of
https://github.com/openSUSE/osc.git
synced 2025-01-24 22:06:14 +01:00
Fix calling findpacs() with os.curdir
A list of strings is expected, but a string was passed. It was working only by coincidence, because iterating through ["."] and "." gives the same result.
This commit is contained in:
parent
8dbf859ce2
commit
175a44bc97
@ -1130,7 +1130,7 @@ def main(apiurl, opts, argv):
|
||||
if not old_pkg_dir.startswith('/') and not opts.offline:
|
||||
data = [prj, pacname, repo, arch]
|
||||
if old_pkg_dir == '_link':
|
||||
p = core.findpacs(os.curdir)[0]
|
||||
p = core.findpacs([os.curdir])[0]
|
||||
if not p.islink():
|
||||
raise oscerr.WrongOptions('package is not a link')
|
||||
data[0] = p.linkinfo.project
|
||||
|
@ -1395,7 +1395,7 @@ class Osc(cmdln.Cmdln):
|
||||
|
||||
elif len(args) <= 2:
|
||||
# try using the working copy at hand
|
||||
p = findpacs(os.curdir)[0]
|
||||
p = findpacs([os.curdir])[0]
|
||||
src_project = p.prjname
|
||||
src_package = p.name
|
||||
if self.options.apiurl and self.options.apiurl != p.apiurl:
|
||||
@ -1627,7 +1627,7 @@ Please submit there instead, or use --nodevelproject to force direct submission.
|
||||
|
||||
elif len(args) <= 2:
|
||||
# try using the working copy at hand
|
||||
p = findpacs(os.curdir)[0]
|
||||
p = findpacs([os.curdir])[0]
|
||||
src_project = p.prjname
|
||||
src_package = p.name
|
||||
if len(args) == 0 and p.islink():
|
||||
@ -2742,7 +2742,7 @@ Please submit there instead, or use --nodevelproject to force direct submission.
|
||||
rev = None
|
||||
|
||||
if len(args) == 0:
|
||||
p = findpacs(os.curdir)[0]
|
||||
p = findpacs([os.curdir])[0]
|
||||
project = p.prjname
|
||||
package = p.name
|
||||
apiurl = p.apiurl
|
||||
|
Loading…
Reference in New Issue
Block a user