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

Revert "wireguard: T4930: remove pylint W0611: unused import" #4376

Merged
merged 1 commit into from
Mar 2, 2025

Conversation

jameskr97
Copy link
Contributor

@jameskr97 jameskr97 commented Mar 1, 2025

Change summary

Here is the commit being reverted: bb70ea5

Here are the lines that were removed in the above commit.

import time
from datetime import timedelta
from hurry.filesize import size
from hurry.filesize import alternative

Here is where time and timedelta are used in the file:

if int(wgpeer['latest_handshake']) > 0:
delta = timedelta(
seconds=int(time.time() - wgpeer['latest_handshake'])
)

Here is here size and alternative are used in the file:

if wgpeer['transfer_rx'] > 0 or wgpeer['transfer_tx'] > 0:
rx_size = size(wgpeer['transfer_rx'], system=alternative)
tx_size = size(wgpeer['transfer_tx'], system=alternative)
answer += ' transfer: {} received, {} sent\n'.format(

Please revert this commit. It breaks show interfaces wireguard <interface> summary.

Thank you.

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)

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

@jameskr97 jameskr97 requested a review from a team as a code owner March 1, 2025 20:22
Copy link

github-actions bot commented Mar 1, 2025


PR title does not match the required format

Copy link

github-actions bot commented Mar 1, 2025

CI integration ❌ failed!

Details

CI logs

  • CLI Smoketests (no interfaces) 👍 passed
  • CLI Smoketests (interfaces only) ❌ failed
  • Config tests 👍 passed
  • RAID1 tests 👍 passed
  • TPM tests 👍 passed

Copy link
Member

@dmbaturin dmbaturin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's an unfortunate fact that the linter has false positives...

@dmbaturin dmbaturin merged commit fc500ae into vyos:current Mar 2, 2025
11 of 15 checks passed
@vyosbot vyosbot added the mirror-initiated This PR initiated for mirror sync workflow label Mar 2, 2025
@kumvijaya kumvijaya removed the mirror-initiated This PR initiated for mirror sync workflow label Mar 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

5 participants