System.IO.Ports.InvalidOperationException

Here are the examples of the python api System.IO.Ports.InvalidOperationException taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

22 Examples 7

Example 1

Project: pyserial
Source File: serialcli.py
View license
    def close(self):
        """Close port"""
        if self.is_open:
            if self._port_handle:
                try:
                    self._port_handle.Close()
                except System.IO.Ports.InvalidOperationException:
                    # ignore errors. can happen for unplugged USB serial devices
                    pass
                self._port_handle = None
            self.is_open = False

Example 2

Project: pyserial
Source File: serialcli.py
View license
    def close(self):
        """Close port"""
        if self.is_open:
            if self._port_handle:
                try:
                    self._port_handle.Close()
                except System.IO.Ports.InvalidOperationException:
                    # ignore errors. can happen for unplugged USB serial devices
                    pass
                self._port_handle = None
            self.is_open = False

Example 3

Project: mavelous
Source File: serialcli.py
View license
    def close(self):
        """Close port"""
        if self._isOpen:
            if self._port_handle:
                try:
                    self._port_handle.Close()
                except System.IO.Ports.InvalidOperationException:
                    # ignore errors. can happen for unplugged USB serial devices
                    pass
                self._port_handle = None
            self._isOpen = False

Example 4

Project: mavelous
Source File: serialcli.py
View license
    def close(self):
        """Close port"""
        if self._isOpen:
            if self._port_handle:
                try:
                    self._port_handle.Close()
                except System.IO.Ports.InvalidOperationException:
                    # ignore errors. can happen for unplugged USB serial devices
                    pass
                self._port_handle = None
            self._isOpen = False

Example 5

Project: cgstudiomap
Source File: serialcli.py
View license
    def close(self):
        """Close port"""
        if self._isOpen:
            if self._port_handle:
                try:
                    self._port_handle.Close()
                except System.IO.Ports.InvalidOperationException:
                    # ignore errors. can happen for unplugged USB serial devices
                    pass
                self._port_handle = None
            self._isOpen = False

Example 6

Project: cgstudiomap
Source File: serialcli.py
View license
    def close(self):
        """Close port"""
        if self._isOpen:
            if self._port_handle:
                try:
                    self._port_handle.Close()
                except System.IO.Ports.InvalidOperationException:
                    # ignore errors. can happen for unplugged USB serial devices
                    pass
                self._port_handle = None
            self._isOpen = False

Example 7

Project: tinypacks
Source File: serialcli.py
View license
    def close(self):
        """Close port"""
        if self._isOpen:
            if self._port_handle:
                try:
                    self._port_handle.Close()
                except System.IO.Ports.InvalidOperationException:
                    # ignore errors. can happen for unplugged USB serial devices
                    pass
                self._port_handle = None
            self._isOpen = False

Example 8

Project: tinypacks
Source File: serialcli.py
View license
    def close(self):
        """Close port"""
        if self._isOpen:
            if self._port_handle:
                try:
                    self._port_handle.Close()
                except System.IO.Ports.InvalidOperationException:
                    # ignore errors. can happen for unplugged USB serial devices
                    pass
                self._port_handle = None
            self._isOpen = False

Example 9

Project: ControlBoard
Source File: serialcli.py
View license
    def close(self):
        """Close port"""
        if self._isOpen:
            if self._port_handle:
                try:
                    self._port_handle.Close()
                except System.IO.Ports.InvalidOperationException:
                    # ignore errors. can happen for unplugged USB serial devices
                    pass
                self._port_handle = None
            self._isOpen = False

Example 10

Project: ControlBoard
Source File: serialcli.py
View license
    def close(self):
        """Close port"""
        if self._isOpen:
            if self._port_handle:
                try:
                    self._port_handle.Close()
                except System.IO.Ports.InvalidOperationException:
                    # ignore errors. can happen for unplugged USB serial devices
                    pass
                self._port_handle = None
            self._isOpen = False

Example 11

Project: ControlBoard
Source File: serialcli.py
View license
    def close(self):
        """Close port"""
        if self._isOpen:
            if self._port_handle:
                try:
                    self._port_handle.Close()
                except System.IO.Ports.InvalidOperationException:
                    # ignore errors. can happen for unplugged USB serial devices
                    pass
                self._port_handle = None
            self._isOpen = False

Example 12

Project: ControlBoard
Source File: serialcli.py
View license
    def close(self):
        """Close port"""
        if self._isOpen:
            if self._port_handle:
                try:
                    self._port_handle.Close()
                except System.IO.Ports.InvalidOperationException:
                    # ignore errors. can happen for unplugged USB serial devices
                    pass
                self._port_handle = None
            self._isOpen = False

Example 13

Project: ControlBoard
Source File: serialcli.py
View license
    def close(self):
        """Close port"""
        if self._isOpen:
            if self._port_handle:
                try:
                    self._port_handle.Close()
                except System.IO.Ports.InvalidOperationException:
                    # ignore errors. can happen for unplugged USB serial devices
                    pass
                self._port_handle = None
            self._isOpen = False

Example 14

Project: ControlBoard
Source File: serialcli.py
View license
    def close(self):
        """Close port"""
        if self._isOpen:
            if self._port_handle:
                try:
                    self._port_handle.Close()
                except System.IO.Ports.InvalidOperationException:
                    # ignore errors. can happen for unplugged USB serial devices
                    pass
                self._port_handle = None
            self._isOpen = False

Example 15

Project: ControlBoard
Source File: serialcli.py
View license
    def close(self):
        """Close port"""
        if self._isOpen:
            if self._port_handle:
                try:
                    self._port_handle.Close()
                except System.IO.Ports.InvalidOperationException:
                    # ignore errors. can happen for unplugged USB serial devices
                    pass
                self._port_handle = None
            self._isOpen = False

Example 16

Project: ControlBoard
Source File: serialcli.py
View license
    def close(self):
        """Close port"""
        if self._isOpen:
            if self._port_handle:
                try:
                    self._port_handle.Close()
                except System.IO.Ports.InvalidOperationException:
                    # ignore errors. can happen for unplugged USB serial devices
                    pass
                self._port_handle = None
            self._isOpen = False

Example 17

Project: s2a_fm
Source File: serialcli.py
View license
    def close(self):
        """Close port"""
        if self._isOpen:
            if self._port_handle:
                try:
                    self._port_handle.Close()
                except System.IO.Ports.InvalidOperationException:
                    # ignore errors. can happen for unplugged USB serial devices
                    pass
                self._port_handle = None
            self._isOpen = False

Example 18

Project: s2a_fm
Source File: serialcli.py
View license
    def close(self):
        """Close port"""
        if self._isOpen:
            if self._port_handle:
                try:
                    self._port_handle.Close()
                except System.IO.Ports.InvalidOperationException:
                    # ignore errors. can happen for unplugged USB serial devices
                    pass
                self._port_handle = None
            self._isOpen = False

Example 19

Project: s2a_fm
Source File: serialcli.py
View license
    def close(self):
        """Close port"""
        if self._isOpen:
            if self._port_handle:
                try:
                    self._port_handle.Close()
                except System.IO.Ports.InvalidOperationException:
                    # ignore errors. can happen for unplugged USB serial devices
                    pass
                self._port_handle = None
            self._isOpen = False

Example 20

Project: s2a_fm
Source File: serialcli.py
View license
    def close(self):
        """Close port"""
        if self._isOpen:
            if self._port_handle:
                try:
                    self._port_handle.Close()
                except System.IO.Ports.InvalidOperationException:
                    # ignore errors. can happen for unplugged USB serial devices
                    pass
                self._port_handle = None
            self._isOpen = False

Example 21

Project: AstroBox
Source File: serialcli.py
View license
    def close(self):
        """Close port"""
        if self._isOpen:
            if self._port_handle:
                try:
                    self._port_handle.Close()
                except System.IO.Ports.InvalidOperationException:
                    # ignore errors. can happen for unplugged USB serial devices
                    pass
                self._port_handle = None
            self._isOpen = False

Example 22

Project: AstroBox
Source File: serialcli.py
View license
    def close(self):
        """Close port"""
        if self._isOpen:
            if self._port_handle:
                try:
                    self._port_handle.Close()
                except System.IO.Ports.InvalidOperationException:
                    # ignore errors. can happen for unplugged USB serial devices
                    pass
                self._port_handle = None
            self._isOpen = False