Skip to content

Commit

Permalink
Merge pull request #56 from Ichabond/master
Browse files Browse the repository at this point in the history
Fixes #55: Check commit comment length
  • Loading branch information
mirceaulinic authored Apr 16, 2018
2 parents e732063 + 2661791 commit a60b550
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pyIOSXR/iosxr.py
Original file line number Diff line number Diff line change
Expand Up @@ -579,14 +579,14 @@ def commit_config(self, label=None, comment=None, confirmed=None):
Commit the candidate config.
:param label: Commit comment, displayed in the commit entry on the device.
:param comment: Commit label, displayed instead of the commit ID on the device.
:param comment: Commit label, displayed instead of the commit ID on the device. (Max 60 characters)
:param confirmed: Commit with auto-rollback if new commit is not made in 30 to 300 sec
"""
rpc_command = '<Commit'
if label:
rpc_command += ' Label="%s"' % label
if comment:
rpc_command += ' Comment="%s"' % comment
rpc_command += ' Comment="%s"' % comment[:60]
if confirmed:
if 30 <= int(confirmed) <= 300:
rpc_command += ' Confirmed="%d"' % int(confirmed)
Expand Down

0 comments on commit a60b550

Please sign in to comment.