python - SyntaxError in finally (Django) -


I am using Django, and I have the following error:

exception Type: SyntaxError exception value: Invalid syntax (views.py, line 115 )

My viws.py code looks like this:

 

Where MyExceptionClass A class extension is an exception, and line 115 is 'finally' section line If I remove the segment at the end (line 115-116), it works fine. Any ideas?

Thanks a lot!

Which version of the dragon are you using? Before 2.5 you can not get the block in the same endeavor block both in block and finally.

You can work with the nests of blocks.

  def My request (request): Try: [...] except MyExceptionClass, E: [...] Finally: render_to_response ('template.html', {}, context_instance RequestContext = Request 

Comments

Popular posts from this blog

python - Overriding the save method in Django ModelForm -

html - CSS autoheight, but fit content to height of div -

qt - How to prevent QAudioInput from automatically boosting the master volume to 100%? -