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

Fix format handling so it works with py3.4 #69

Merged
merged 2 commits into from
May 25, 2017
Merged

Conversation

rkuska
Copy link
Contributor

@rkuska rkuska commented May 20, 2014

Nose-progressive fails while building with python 3.4 in fedora:
http://kojipkgs.fedoraproject.org//work/tasks/5198/6855198/build.log
because of line_number is None when formatting

Python 3.3:

>>> line = None
>>> line_max = 10
>>> '+{line_number:<{line_number_max_width}}'.format(line_number=line, line_number_max_width=line_max)
'+None 

Python 3.4

>>> line = None
>>> line_max = 10
>>> '+{line_number:<{line_number_max_width}}'.format(line_number=line, line_number_max_width=line_max)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: non-empty format string passed to object.__format__

See http://bugs.python.org/issue7994

@erikrose erikrose merged commit 56b6b07 into erikrose:master May 25, 2017
@erikrose
Copy link
Owner

Thanks for the patch, and I hope your intervening years have been pleasant. :-)

@rkuska
Copy link
Contributor Author

rkuska commented May 26, 2017

Oh, thank you :D

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

Successfully merging this pull request may close these issues.

2 participants