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

devel-project: "list" is the default command, Python 3.3 fix #2444

Merged
merged 2 commits into from
Nov 7, 2021

Conversation

lkocman
Copy link
Contributor

@lkocman lkocman commented May 28, 2020

Workaround for https://bugs.python.org/issue16308

kocman@localhost:~/Workspace/opensuse/openSUSE-release-tools> python3 devel-project.py
Traceback (most recent call last):
File "devel-project.py", line 300, in
main()
File "devel-project.py", line 297, in main
sys.exit(args.func(args))
AttributeError: 'Namespace' object has no attribute 'func'

@lkocman
Copy link
Contributor Author

lkocman commented May 28, 2020

CI Fails at File "/usr/lib/python3.8/site-packages/osc/core.py", line 4238, in create_submit_request
cgi.escape(message))
AttributeError: module 'cgi' has no attribute 'escape'

This seems to be not related to my change at all

@coolo
Copy link
Member

coolo commented Jun 23, 2021

Can you rebase?

Workarouds https://bugs.python.org/issue16308
Which otherwise causes:
  AttributeError: 'Namespace' object has no attribute 'func'
@mvidner mvidner force-pushed the devel-project_func_callback branch from 7c03119 to 4e54cb5 Compare August 5, 2021 09:25
@mvidner
Copy link
Member

mvidner commented Aug 5, 2021

I have rebased this, but there is still a similar problem and I am not familiar enough with the APIs to fix it:

$ python3 ./devel-project.py
...
utilities
vdr
windows:mingw:win32
windows:mingw:win64
zypp:Head
zypp:plugins
Traceback (most recent call last):
  File "./devel-project.py", line 300, in <module>
    main()
  File "./devel-project.py", line 297, in main
    sys.exit(args.func(args))
  File "./devel-project.py", line 74, in list
    if args.write:
AttributeError: 'Namespace' object has no attribute 'write'

It works fine with python3 ./devel-project.py list

Improves the previous commit,
fixes "AttributeError: 'Namespace' object has no attribute 'write'"
after showing the listing
@mvidner mvidner changed the title devel-project: Add a func callback to main parser devel-project: "list" is the default command, Python 3.3 fix Aug 5, 2021
Copy link
Member

@mvidner mvidner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Having fixed this, I approve :)

@codecov-commenter
Copy link

Codecov Report

Merging #2444 (71baf59) into master (455dc99) will increase coverage by 0.01%.
The diff coverage is 80.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2444      +/-   ##
==========================================
+ Coverage   25.20%   25.21%   +0.01%     
==========================================
  Files          91       91              
  Lines       15156    15160       +4     
==========================================
+ Hits         3820     3823       +3     
- Misses      11336    11337       +1     
Impacted Files Coverage Δ
devel-project.py 51.98% <80.00%> (+0.46%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 455dc99...71baf59. Read the comment docs.

@coolo coolo merged commit bab90ef into openSUSE:master Nov 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants