Skip to content

Conversation

@Bastian-Krause
Copy link
Member

Description
labgrid-client forward --remote accidentally uses the variable localport, which is either not set at all (leading to a
UnboundLocalError) if no --local/-L is set or is set to the LOCAL part of --local/-L, which is wrong. The LOCAL part of --remote/-R should be used instead.

Fix that by using the correct variable local.

Note that the informational print used the correct variable already.

Checklist

  • CHANGES.rst has been updated
  • PR has been tested

Fixes #751

'labgrid-client forward --remote' accidentally uses the variable
'localport', which is either not set at all (leading to a
UnboundLocalError) if no --local/-L is set or is set to the LOCAL part
of --local/-L, which is wrong. The LOCAL part of --remote/-R should be
used instead.

Fix that by using the correct variable 'local'.

Note that the informational print used the correct variable already.

Fixes: 51f3fe5 ("client: Add port forwarding")
Signed-off-by: Bastian Krause <bst@pengutronix.de>
@Bastian-Krause
Copy link
Member Author

@JoshuaWatt Could you take a look?

@Emantor Emantor added the pick to stable Needs a pick to the latest stable branch label Oct 18, 2021
@codecov
Copy link

codecov bot commented Oct 18, 2021

Codecov Report

Merging #853 (1850921) into master (36bc654) will not change coverage.
The diff coverage is 0.0%.

Impacted file tree graph

@@          Coverage Diff           @@
##           master    #853   +/-   ##
======================================
  Coverage    56.9%   56.9%           
======================================
  Files         145     145           
  Lines       10854   10854           
======================================
  Hits         6179    6179           
  Misses       4675    4675           
Impacted Files Coverage Δ
labgrid/remote/client.py 44.6% <0.0%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 36bc654...1850921. Read the comment docs.

@JoshuaWatt
Copy link
Contributor

LGTM; sorry about that!

@Bastian-Krause Bastian-Krause requested review from Emantor and SmithChart and removed request for SmithChart October 19, 2021 08:37
Emantor
Emantor previously approved these changes Oct 20, 2021
@Emantor Emantor merged commit ec10984 into labgrid-project:master Oct 27, 2021
@Bastian-Krause Bastian-Krause removed the pick to stable Needs a pick to the latest stable branch label Jul 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants