Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
Fix get bool env Issue #102 #103
@@ Coverage Diff @@ ## master #103 +/- ## ========================================= + Coverage 92.32% 92.43% +0.1% ========================================= Files 4 4 Lines 482 489 +7 ========================================= + Hits 445 452 +7 Misses 37 37
@pryorda - .lower() makes sense. Makes it a little bit more user friendly IMO. I will make the modification.…
On Fri, May 10, 2019 at 9:19 AM Daniel Pryor ***@***.***> wrote: ***@***.**** commented on this pull request. This looks good to me let me know your thoughts on .lower()? ------------------------------ In vmware_exporter/helpers.py <#103 (comment)> : > @@ -4,7 +4,13 @@ def get_bool_env(key, default=None): - return bool(os.environ.get(key, default)) + value = os.environ.get(key, default) + if isinstance(value, str): + if value == 'False': Should we add .lower() to this to make sure that we account case variations? — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub <#103 (review)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AAFVZHJG2LODYJ7NUGD374TPUWN7VANCNFSM4HLXAQAQ> .
Add this suggestion to a batch that can be applied as a single commit. This suggestion is invalid because no changes were made to the code. Suggestions cannot be applied while the pull request is closed. Suggestions cannot be applied while viewing a subset of changes. Only one suggestion per line can be applied in a batch. Add this suggestion to a batch that can be applied as a single commit. Applying suggestions on deleted lines is not supported. You must change the existing code in this line in order to create a valid suggestion. Outdated suggestions cannot be applied. This suggestion has been applied or marked resolved. Suggestions cannot be applied from pending reviews.