summaryrefslogtreecommitdiff
path: root/AT91SAM7S256/armdebug/nxt-python-fantom/nxt/fantomglue.py
diff options
context:
space:
mode:
Diffstat (limited to 'AT91SAM7S256/armdebug/nxt-python-fantom/nxt/fantomglue.py')
-rw-r--r--AT91SAM7S256/armdebug/nxt-python-fantom/nxt/fantomglue.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/AT91SAM7S256/armdebug/nxt-python-fantom/nxt/fantomglue.py b/AT91SAM7S256/armdebug/nxt-python-fantom/nxt/fantomglue.py
index 6281c95..178d7b0 100644
--- a/AT91SAM7S256/armdebug/nxt-python-fantom/nxt/fantomglue.py
+++ b/AT91SAM7S256/armdebug/nxt-python-fantom/nxt/fantomglue.py
@@ -53,7 +53,8 @@ class BluetoothSocket:
return self._sock.read( numbytes )
def close(self):
- del self._sock
+ if sef._sock is not None:
+ del self._sock
class BluetoothError(IOError):
pass
@@ -107,4 +108,5 @@ class USBSocket:
return self._sock.read( numbytes )
def close(self):
- del self._sock
+ if sef._sock is not None:
+ del self._sock