Skip to content

In "handler.py" self.finish() get called twice and raises an exception#11

Open
massimiliano-della-rovere wants to merge 2 commits intotornado-utils:masterfrom
massimiliano-della-rovere:master
Open

In "handler.py" self.finish() get called twice and raises an exception#11
massimiliano-della-rovere wants to merge 2 commits intotornado-utils:masterfrom
massimiliano-della-rovere:master

Conversation

@massimiliano-della-rovere

Every time a request interacts with the DB via SQLAlchemy and causes an error (e.g. breaking a unique constraint, non-existent column, etc), a RuntimeError is raised by Tornado because the self.finish() method is called twice in Tornado Restless.

This patch assures that in the "patch", "delete", "put", "post", "get" methods call "self.finish(result)" only once.

You can find a detailed description of the causes in #10

Every time a request interacts with the DB via SQLAlchemy and causes an error (e.g. breaking a unique constraint, non-existent column, etc), a RuntimeError is raised by Tornado because the self.finish() method is called twice in Tornado Restless.

This patch assures that in the "patch", "delete", "put", "post", "get" methods call "self.finish(result)" only once.

You can find a detailed description of the causes in tornado-utils#10
…la-rovere-patch-1

Please update the file "handler.py"
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.

1 participant