�
��^W � � � d dl mZ d dlZd dlZ e n
# e$ r eZY nw xY w G d� dej � � Zedk r ed� � Z de _
ee � � dS dS )� )�absolute_importNc �L � e Zd ZdZej j j d� � � Zd� ZdS )�SerialzOJust inherit the native Serial port implementation and patch the port property.c � � t |t � � rO|� d� � r:t j j � | | � |� � � � dS t j j � | |� � dS )z%translate port name before storing it� hwgrep://N)�
isinstance�
basestring�
startswith�serialr �port�__set__�from_url)�self�values �C/usr/lib/python3/dist-packages/serial/urlhandler/protocol_hwgrep.pyr zSerial.port& |