summaryrefslogtreecommitdiff
path: root/src/conf_mode/service_https.py
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2026-03-05 21:05:36 +0000
committerChristian Breunig <christian@breunig.cc>2026-03-05 22:18:56 +0100
commit838cf65b1c181b7b4f00ae712166065bad0fbf54 (patch)
treee687dff62b2ec17016cd599fcc95cbf027f6c2bd /src/conf_mode/service_https.py
parent2d73f1e8195a2f5edffcf95a4741885cfcd0bf6c (diff)
downloadvyos-1x-838cf65b1c181b7b4f00ae712166065bad0fbf54.tar.gz
vyos-1x-838cf65b1c181b7b4f00ae712166065bad0fbf54.zip
remote: T8347: fix variable assignment for try/except block
Pylint is pointing out that because sftp.put(location, path) is located inside a finally block, it is guaranteed to execute regardless of whether the try block succeeds or fails. If an exception other than an IOError is raised inside the try block, "except IOError" block gets skipped, Python then jumps straight to the finally block. When it executes the finally block, it attempts to read the variable path, but path was never assigned! This triggers UnboundLocalError, local variable 'path' referenced before assignment.
Diffstat (limited to 'src/conf_mode/service_https.py')
0 files changed, 0 insertions, 0 deletions