We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
HI, We are using modernize for upgrading a code. And we get fails after replacing raise with six.reraise in a function below:
def reformat_raise_error(header='', footer=''): if DEBUG or (not header and not footer): raise raise sys.exc_info()[0], '%s %s %s' % (header, sys.exc_info()[1], footer), sys.exc_info()[2]
It get translated in this way:
def reformat_raise_error(header='', footer=''): if DEBUG or (not header and not footer): raise six.reraise(sys.exc_info()[0], '%s %s %s' % (header, sys.exc_info()[1], footer), sys.exc_info()[2])
it falls with an error: type 'str' has no attribute __trackback__.
I tried to refactor the raise call.
def reformat_raise_error(header='', footer=''): if DEBUG or (not header and not footer): raise t, v, tb = sys.exc_info() six.reraise(t, t(' '.join([header, str(v), footer])), tb)
But I got even more frustrated error when running it with python2.7:
six.reraise(t, t(' '.join([header, str(v), footer])), tb) TypeError: function takes exactly 5 arguments (1 given)
I'd appreciate any advice.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
HI,
We are using modernize for upgrading a code. And we get fails after replacing raise with six.reraise in a function below:
It get translated in this way:
it falls with an error: type 'str' has no attribute __trackback__.
I tried to refactor the raise call.
But I got even more frustrated error when running it with python2.7:
I'd appreciate any advice.
The text was updated successfully, but these errors were encountered: