nicolaiev / webiopi

Automatically exported from code.google.com/p/webiopi
0 stars 0 forks source link

Some potential errors from PyDev code checker #25

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
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 commented 9 years ago
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

GoogleCodeExporter commented 9 years ago
This issue was closed by revision r886.

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

GoogleCodeExporter commented 9 years ago
Issue 26 has been merged into this issue.

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