~widelands-dev/widelands-website/trunk

« back to all changes in this revision

Viewing changes to pybb/util.py

  • Committer: franku
  • Date: 2019-04-11 15:06:09 UTC
  • mto: This revision was merged to the branch mainline in revision 540.
  • Revision ID: somal@arcor.de-20190411150609-801l72ffxgr6gkui
converted to python 3.6 using 2to3 script

Show diffs side-by-side

added added

removed removed

Lines of Context:
59
59
        if request.method == 'POST':
60
60
            try:
61
61
                response = func(request, *args, **kwargs)
62
 
            except Exception, ex:
 
62
            except Exception as ex:
63
63
                response = {'error': traceback.format_exc()}
64
64
        else:
65
65
            response = {'error': {'type': 403,
144
144
        # Apply the new content
145
145
        found_string.parent.contents = new_content
146
146
 
147
 
    return unicode(soup)
 
147
    return str(soup)
148
148
 
149
149
 
150
150
def quote_text(text, user, markup):