Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

osc linkpac fails to overwrite link file #1541

Closed
olafhering opened this issue Apr 18, 2024 · 1 comment · Fixed by #1543
Closed

osc linkpac fails to overwrite link file #1541

olafhering opened this issue Apr 18, 2024 · 1 comment · Fixed by #1543
Labels

Comments

@olafhering
Copy link
Contributor

This fails in 15.5, and also in current Tumbleweed.

osc linkpac -C add -d fooprj pkg tgtprj
osc linkpac -C add -d -f barprj pkg tgtprj
Traceback (most recent call last):
  File "/usr/bin/osc", line 33, in <module>
    sys.exit(load_entry_point('osc==1.6.1', 'console_scripts', 'osc')())
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/osc/babysitter.py", line 226, in main
    sys.exit(run(commandline.OscMainCommand()))
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/osc/babysitter.py", line 69, in run
    prg.main(argv)
  File "/usr/lib/python3.11/site-packages/osc/commandline.py", line 558, in main
    cmd.run(args)
  File "/usr/lib/python3.11/site-packages/osc/commandline.py", line 246, in run
    cmd.run(args)
  File "/usr/lib/python3.11/site-packages/osc/commandline.py", line 502, in run
    self.func(args.command, args, *args.positional_args)
  File "/usr/lib/python3.11/site-packages/osc/commandline.py", line 3792, in do_linkpac
    link_pac(
  File "/usr/lib/python3.11/site-packages/osc/core.py", line 5825, in link_pac
    root = ET.fromstring(''.join(dst_meta))
                         ^^^^^^^^^^^^^^^^^
TypeError: sequence item 0: expected str instance, bytes found

@olafhering olafhering added the Bug label Apr 18, 2024
@dmach dmach mentioned this issue Apr 19, 2024
@dmach
Copy link
Contributor

dmach commented Apr 19, 2024

I've fixed this in #1543.
Someday I'll port this to the XML object wrappers (aka models) that live in osc.obs_api module to get rid of such issues completely.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants