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

rss_rc action: use write instead of _write #48

Closed
wants to merge 1 commit into from

Conversation

pabs3
Copy link

@pabs3 pabs3 commented Jan 7, 2020

_write was a private function of the RssGenerator class while
.write is a public function that still exists.

Fixes: https://bugs.debian.org/787583
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/werkzeug/wsgi.py", line 588, in call
return self.app(environ, start_response)
File "/usr/lib/python2.7/dist-packages/MoinMoin/wsgiapp.py", line 264, in call
response = run(context)
File "/usr/lib/python2.7/dist-packages/MoinMoin/wsgiapp.py", line 89, in run
response = dispatch(request, context, action_name)
File "/usr/lib/python2.7/dist-packages/MoinMoin/wsgiapp.py", line 137, in dispatch
response = handle_action(context, pagename, action_name)
File "/usr/lib/python2.7/dist-packages/MoinMoin/wsgiapp.py", line 203, in handle_action
handler(context.page.page_name, context)
File "/usr/lib/python2.7/dist-packages/MoinMoin/action/rss_rc.py", line 178, in execute
handler._write(
AttributeError: RssGenerator instance has no attribute '_write'

_write was a private function of the RssGenerator class while
.write is a public function that still exists.

Fixes: https://bugs.debian.org/787583
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/werkzeug/wsgi.py", line 588, in __call__
    return self.app(environ, start_response)
  File "/usr/lib/python2.7/dist-packages/MoinMoin/wsgiapp.py", line 264, in __call__
    response = run(context)
  File "/usr/lib/python2.7/dist-packages/MoinMoin/wsgiapp.py", line 89, in run
    response = dispatch(request, context, action_name)
  File "/usr/lib/python2.7/dist-packages/MoinMoin/wsgiapp.py", line 137, in dispatch
    response = handle_action(context, pagename, action_name)
  File "/usr/lib/python2.7/dist-packages/MoinMoin/wsgiapp.py", line 203, in handle_action
    handler(context.page.page_name, context)
  File "/usr/lib/python2.7/dist-packages/MoinMoin/action/rss_rc.py", line 178, in execute
    handler._write(
AttributeError: RssGenerator instance has no attribute '_write'
@ThomasWaldmann
Copy link
Member

Related: #25

Since you are fixing a 5y old bug that likely only happened on very old versions of python 2.7, I'ld rather first see if it happens with recent 2.7.x versions.

@pabs3
Copy link
Author

pabs3 commented Jan 8, 2020 via email

@ThomasWaldmann
Copy link
Member

@pabs3 thanks for analyzing the issue.

I agree about private members, but that fact is commonly known to developers so I suspect there was some reason to use that and not the more obvious (and also "public") .write().

So if we want to change that, we need to be rather sure it does not break in some other situation.
Guess the only way to do that is to dig into moin repo history about changes at that place in the code and also to compare .write to ._write.

If you want to do that, feel free - otherwise I would prefer not touching that code considering you could fix it by removing the old python-xml code.

About updating issues: I only maintain issues filed in the project's issue tracker (== here).

@pabs3
Copy link
Author

pabs3 commented Jan 8, 2020 via email

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.

None yet

2 participants