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 (backport #3489) #3491

Merged
merged 1 commit into from
May 21, 2024

Conversation

mergify[bot]
Copy link
Contributor

@mergify mergify bot commented May 21, 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

This is an automatic backport of pull request #3489 done by [Mergify](https://mergify.com).

/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'

(cherry picked from commit 0d6e441)
@github-actions github-actions bot added the sagitta VyOS 1.4 LTS label May 21, 2024
@c-po c-po merged commit 412789b into sagitta May 21, 2024
4 of 5 checks passed
@mergify mergify bot deleted the mergify/bp/sagitta/pr-3489 branch May 21, 2024 13:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
sagitta VyOS 1.4 LTS
Development

Successfully merging this pull request may close these issues.

3 participants