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

Removed unnecessary try/except and cleaned for some PEP8 #155

Merged
merged 1 commit into from Jan 11, 2015
Merged

Removed unnecessary try/except and cleaned for some PEP8 #155

merged 1 commit into from Jan 11, 2015

Conversation

warvariuc
Copy link
Contributor

No description provided.

@Lawouach
Copy link
Owner

Hello,

I'm not quite sure it was a useless try/except clause. As it stands, in your code the ws object may never removed from the pool. Is that expected?

@warvariuc
Copy link
Contributor Author

I don't quite understand what you mean.
These lines

if ws:
    self.server.pool.track(ws)

will be reached in the old and new implementations only if there were no exceptions in the first 3 lines, because of this:

except:
   raise

@Lawouach
Copy link
Owner

Damn. I somehow read finally rather than else on the try/except. You are right.

Lawouach added a commit that referenced this pull request Jan 11, 2015
Removed unnecessary try/except and cleaned for some PEP8
@Lawouach Lawouach merged commit 84e8589 into Lawouach:master Jan 11, 2015
@warvariuc
Copy link
Contributor Author

Maybe there should be some logic using finally but I am not aware of it.

@Lawouach
Copy link
Owner

I think I need to spend some time trying to identify the key issues with error handlings and related cleanups.

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