fix setXON
diff --git a/serial/serialposix.py b/serial/serialposix.py
index b71df8d..5542d28 100644
--- a/serial/serialposix.py
+++ b/serial/serialposix.py
@@ -645,7 +645,7 @@
         This will send XON (true) and XOFF (false) to the other device.
         WARNING: this function is not portable to different platforms!
         """
-        if not self.hComPort: raise portNotOpenError
+        if not self._isOpen: raise portNotOpenError
         if enable:
             termios.tcflow(self.fd, TERMIOS.TCION)
         else: