Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Prio 0] Account for different python string types during setup_code_coverage #654

Closed
JacobCallahan opened this issue Feb 23, 2018 · 2 comments
Labels

Comments

@JacobCallahan
Copy link
Member

During our latest RHEL 7 ISO installation attempt, the installer ran into this issue.

run: mkdir -p /etc/coverage
Traceback (most recent call last):
...
  File "/home/jenkins/workspace/provisioning-6.2-rhel7/automation_tools/__init__.py", line 737, in setup_code_coverage
    coveragerc_file.write('[run]\n')
TypeError: unicode argument expected, got 'str'

I did some quick searching and found a possible solution

try:
    # Python 2
    from cStringIO import StringIO
except ImportError:
    # Python 3
    from io import StringIO

Then remove io. from the rest of the code base.

@JacobCallahan
Copy link
Member Author

Looking at our code, it looks like that solution above probably won't work, since we try to import from essentially the same module.

@kbidarkar
Copy link
Collaborator

Fixed in #655

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants