Skip to content

Commit

Permalink
op-mode: T6367: fix "force commit-archive" TypeError
Browse files Browse the repository at this point in the history
/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'
  • Loading branch information
c-po committed May 20, 2024
1 parent f45b1b5 commit 0d6e441
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion op-mode-definitions/force-commit-archive.xml.in
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<properties>
<help>Manually archive configuration</help>
</properties>
<command>/usr/bin/config-mgmt</command>
<command>/etc/commit/post-hooks.d/02vyos-commit-archive; printf "\n"</command>
</leafNode>
</children>
</node>
Expand Down

0 comments on commit 0d6e441

Please sign in to comment.