3 M]W/ @sfddlZddlZyeWnek r0eZYnXGdddejZedkrbedZde_e edS)Nc@s*eZdZdZejjjddZddZdS)SerialzOJust inherit the native Serial port implementation and patch the port property.cCs@t|tr,|jdr,tjjj||j|ntjjj||dS)z%translate port name before storing itz hwgrep://N) isinstance basestring startswithserialrport__set__from_url)selfvaluer %/usr/lib/python3.6/protocol_hwgrep.pyr$sz Serial.portc Cs,|jjdr|dd}d}d}|jd}|jd}xv|D]n}d|krZ|jdd\}}n|}d}|d krt|d}|dkrtd j|q<|d krd }qs 6