Skip to content

Instantly share code, notes, and snippets.

@Glutexo
Created August 20, 2018 10:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Glutexo/d6a5944bc0bf28f08ae46de1bcd78f0e to your computer and use it in GitHub Desktop.
Save Glutexo/d6a5944bc0bf28f08ae46de1bcd78f0e to your computer and use it in GitHub Desktop.
Demonstration of insights-core stdin config parse bug on Python 3
# -*- 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