mirror of
https://github.com/openSUSE/osc.git
synced 2025-08-23 22:58:53 +02: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:
@@ -1130,7 +1130,7 @@ def main(apiurl, opts, argv):
|
|||||||
if not old_pkg_dir.startswith('/') and not opts.offline:
|
if not old_pkg_dir.startswith('/') and not opts.offline:
|
||||||
data = [prj, pacname, repo, arch]
|
data = [prj, pacname, repo, arch]
|
||||||
if old_pkg_dir == '_link':
|
if old_pkg_dir == '_link':
|
||||||
p = core.findpacs(os.curdir)[0]
|
p = core.findpacs([os.curdir])[0]
|
||||||
if not p.islink():
|
if not p.islink():
|
||||||
raise oscerr.WrongOptions('package is not a link')
|
raise oscerr.WrongOptions('package is not a link')
|
||||||
data[0] = p.linkinfo.project
|
data[0] = p.linkinfo.project
|
||||||
|
@@ -1395,7 +1395,7 @@ class Osc(cmdln.Cmdln):
|
|||||||
|
|
||||||
elif len(args) <= 2:
|
elif len(args) <= 2:
|
||||||
# try using the working copy at hand
|
# try using the working copy at hand
|
||||||
p = findpacs(os.curdir)[0]
|
p = findpacs([os.curdir])[0]
|
||||||
src_project = p.prjname
|
src_project = p.prjname
|
||||||
src_package = p.name
|
src_package = p.name
|
||||||
if self.options.apiurl and self.options.apiurl != p.apiurl:
|
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:
|
elif len(args) <= 2:
|
||||||
# try using the working copy at hand
|
# try using the working copy at hand
|
||||||
p = findpacs(os.curdir)[0]
|
p = findpacs([os.curdir])[0]
|
||||||
src_project = p.prjname
|
src_project = p.prjname
|
||||||
src_package = p.name
|
src_package = p.name
|
||||||
if len(args) == 0 and p.islink():
|
if len(args) == 0 and p.islink():
|
||||||
@@ -2742,7 +2742,7 @@ Please submit there instead, or use --nodevelproject to force direct submission.
|
|||||||
rev = None
|
rev = None
|
||||||
|
|
||||||
if len(args) == 0:
|
if len(args) == 0:
|
||||||
p = findpacs(os.curdir)[0]
|
p = findpacs([os.curdir])[0]
|
||||||
project = p.prjname
|
project = p.prjname
|
||||||
package = p.name
|
package = p.name
|
||||||
apiurl = p.apiurl
|
apiurl = p.apiurl
|
||||||
|
Reference in New Issue
Block a user