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

Some potential errors from PyDev code checker #25

Closed
GoogleCodeExporter opened this issue Apr 7, 2015 · 3 comments
Closed

Some potential errors from PyDev code checker #25

GoogleCodeExporter opened this issue Apr 7, 2015 · 3 comments

Comments

@GoogleCodeExporter
Copy link

Hi Eric,

when developing my driver for TSL2561 I imported the curent trunk (r885) into 
PyDev within Eclipse. When looking at the files the error checker found some 
potential errors which I want to give you to check before releasing 0.5.4.

coap.py
Line 45:
- getCode(format): missing self, should be: getCode(self, format):
- same for toString() just below

bus.py
Line 79:
- return "Bus(%s, %s)" % (busName, device) should be: return "Bus(%s, %s)" % 
(self.busName, self.device)

rest.py
Line 311:
- return (404, fname + " Not Found", M_PLAIN) should be: return (404, mname + " 
Not Found", M_PLAIN)

utils.py
Line 192:
-  except (socket.error, e): should be: except (socket.error): (not sure about 
this but "e" seems to be undefined)

Best regards

Andreas


Original issue reported on code.google.com by andreas....@googlemail.com on 9 Feb 2013 at 7:00

@GoogleCodeExporter
Copy link
Author

Thanks for this feedback.

coap.py:
Not, this is not a error, this is some kind of "static" method which not need 
instance.

bus.py:
oops, yes, this is right.

rest.py:
right too.

utils.py:
e is supposed to be filled with the exception, it's not used here.
actually, exception handling is little different in python 2 and 3 for passing 
exception.
if think this is correct in python 2.
i will correct this by removing e, as it's not used.

thanks

Original comment by tro...@trouch.com on 9 Feb 2013 at 7:16

  • Changed state: Accepted

@GoogleCodeExporter
Copy link
Author

This issue was closed by revision r886.

Original comment by tro...@trouch.com on 9 Feb 2013 at 7:16

  • Changed state: Fixed

@GoogleCodeExporter
Copy link
Author

Issue 26 has been merged into this issue.

Original comment by tro...@trouch.com on 10 Feb 2013 at 3:56

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant