richrd / nxt-python

Automatically exported from code.google.com/p/nxt-python
GNU General Public License v3.0
1 stars 0 forks source link

Missing b.sock.close() in nxt_test for Rev. 364 #28

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Run nxt_test with fantom backend
2. Correct output is returned
3. Re-run nxt_test with fantom backend
4. nxt_test aborts with Fantom error

What is the expected output? What do you see instead?
Multiple sequential runs of nxt_test to return correct output.

This is due to a missing b.sock.close() for the normal execution case.
(proposed patch enclosed). I think the other scripts might also be similarly 
impacted but I didn't test them.

Index: nxt_test
===================================================================
--- nxt_test    (revision 364)
+++ nxt_test    (working copy)
@@ -24,6 +24,7 @@
     print 'Firmware version %s.%s' % fw_version
     millivolts = b.get_battery_level()
     print 'Battery level %s mV' % millivolts
+    b.sock.close()
 except:
     print "Error while running test:"
     traceback.print_tb(sys.exc_info()[2])

Original issue reported on code.google.com by tcwa...@gmail.com on 8 Jul 2011 at 3:36

GoogleCodeExporter commented 9 years ago
Marcus, I don't know what is your preferred process for bug fixes, so I'm going 
to report it as an issue rather than patching the file myself to avoid 
unnecessary problems with the svn trunk.

Original comment by tcwa...@gmail.com on 8 Jul 2011 at 3:40

GoogleCodeExporter commented 9 years ago
You can go ahead and patch the trunk. If this were a major issue, we'd also be 
merging into the v2.2 branch and doing a bugfix. As it is, we'll wait for a 
major issue or until v2.3 to incorporate this into a release. Thanks for 
spotting it!

Original comment by marcus@wanners.net on 8 Jul 2011 at 3:47

GoogleCodeExporter commented 9 years ago
Ok. I've patched it in Revison 365 in the trunk.
It is not urgent, it can wait till when you make a new release.

Original comment by tcwa...@gmail.com on 11 Jul 2011 at 3:19

GoogleCodeExporter commented 9 years ago
All right, I'll mark this ticket as fixed then.

Original comment by marcus@wanners.net on 11 Jul 2011 at 12:40