Created
August 20, 2018 10:45
-
-
Save Glutexo/d6a5944bc0bf28f08ae46de1bcd78f0e to your computer and use it in GitHub Desktop.
Demonstration of insights-core stdin config parse bug on Python 3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: UTF-8 -*- | |
from insights.client.client import collect | |
from insights.client.config import InsightsConfig | |
from insights.client.connection import InsightsConnection | |
from mock.mock import patch | |
def main(): | |
with patch("insights.client.client.get_branch_info", return_value={}): | |
config = InsightsConfig(from_stdin=True) | |
pconn = InsightsConnection(config) | |
collect(config, pconn) | |
if __name__ == "__main__": | |
main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment