Fix retrieval of subnet_cidr default
Version Control Information
Source branch: bruno.sc/fix-retrieval-of-default-subnet-cidr
Target branch: devel
Commits:
* Fixup !1049 from suggestions
In !1049 some additions were suggested but not applied. Among other things but
most importantly this left a bug behind where the
`get_default_value_in_tf_vars` function always returned `None`.
This commit cleans this up after the fact.
From: !1049 (comment 1885610407)
Related: ebd723e5
Description
The get_default_value_in_tf_vars
function always returned None
because of the finally
block's return
overriding the one in the try
block.
https://docs.python.org/3/reference/compound_stmts.html#finally-clause:
When a return, break or continue statement is executed in the try suite of a try…finally statement, the finally clause is also executed ‘on the way out.’ The return value of a function is determined by the last return statement executed.
In this turn the other additions from !1049 (comment 1885610407) have been integrated as well.
Bug-introduced-by: db14e242 (!1049 (merged))
Related: !1049 (comment 1885610407)
Merge Prerequisites
-
MR title (and description) are descriptive -
Code is readable and syntactically correct -
Code is understandable -
Documentation has been updated, if necessary -
Commit messages look good -
Release note file in RST format added in latest commit
Superseeded-by: !1254 (merged) (hotfix)
Edited by brunos