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

utils: T6658: fix write_file check in case of empty directory path (backport #3989) #3994

Merged
merged 1 commit into from
Aug 17, 2024

Conversation

mergify[bot]
Copy link
Contributor

@mergify mergify bot commented Aug 16, 2024

Change Summary

Fix check if dirname empty. This is a minor error, but an annoyance after the revisions to the migration system (T6007; not yet backported), which make use of the util write_file for vyos-save-config.py, looking ahead to making config write operations atomic (T6472).

For example, one may want to save a config locally: save some-config without dirpath, which will raise the error:
FileNotFoundError: [Errno 2] No such file or directory: ''
Fix now and backport.

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

Proposed changes

How to test

Smoketest result

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 #3989 done by [Mergify](https://mergify.com).

@mergify mergify bot requested a review from a team as a code owner August 16, 2024 05:59
@github-actions github-actions bot added the sagitta VyOS 1.4 LTS label Aug 16, 2024
Copy link

👍
No issues in PR Title / Commit Title

@c-po c-po merged commit 5ef9126 into sagitta Aug 17, 2024
8 checks passed
@mergify mergify bot deleted the mergify/bp/sagitta/pr-3989 branch August 17, 2024 06:59
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