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

op-mode: T6367: fix "force commit-archive" TypeError #3489

Merged
merged 1 commit into from
May 21, 2024

Conversation

c-po
Copy link
Member

@c-po c-po commented May 20, 2024

Change Summary

/usr/bin/config-mgmt requires an argument OR to be symbolically linked to *commit-revision or *commit-archive, for which it interprets argv[0] through the useful trickery:

https://github.com/vyos/vyos-1x/blob/current/python/vyos/config_mgmt.py#L693-L700

This fixes:

Traceback (most recent call last):
  File "/usr/bin/config-mgmt", line 33, in <module>
    sys.exit(load_entry_point('vyos==1.3.0', 'console_scripts', 'config-mgmt')())
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/vyos/config_mgmt.py", line 746, in run
    func = getattr(config_mgmt, args['subcommand'])
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: attribute name must be string, not 'NoneType'

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes)
  • Migration from an old Vyatta component to vyos-1x, please link to related PR inside obsoleted component
  • Other (please describe):

Related Task(s)

Related PR(s)

Component(s) name

op-mode

Proposed changes

How to test

vyos@vyos:~$ force commit-archive

Checklist:

  • I have read the CONTRIBUTING document
  • I have linked this PR to one or more Phabricator Task(s)
  • I have run the components SMOKETESTS if applicable
  • My commit headlines contain a valid Task id
  • My change requires a change to the documentation
  • I have updated the documentation accordingly

/usr/bin/config-mgmt requires an argument OR to be symbolically linked to
*commit-revision or *commit-archive, for which it interprets argv[0] through
the useful trickery:

https://github.com/vyos/vyos-1x/blob/current/python/vyos/config_mgmt.py#L693-L700

Traceback (most recent call last):
  File "/usr/bin/config-mgmt", line 33, in <module>
    sys.exit(load_entry_point('vyos==1.3.0', 'console_scripts', 'config-mgmt')())
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/vyos/config_mgmt.py", line 746, in run
    func = getattr(config_mgmt, args['subcommand'])
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: attribute name must be string, not 'NoneType'
@c-po c-po requested a review from a team as a code owner May 20, 2024 18:31
@c-po
Copy link
Member Author

c-po commented May 20, 2024

@Mergifyio backport sagitta

Copy link
Contributor

mergify bot commented May 20, 2024

backport sagitta

✅ Backports have been created

@dmbaturin dmbaturin merged commit 9f55afc into vyos:current May 21, 2024
8 checks passed
c-po added a commit that referenced this pull request May 21, 2024
op-mode: T6367: fix "force commit-archive" TypeError (backport #3489)
@c-po c-po deleted the commit-archive branch May 26, 2024 12:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

3 participants