Skip to content

Commit 5c03e23

Browse files
authored
Handle conflict in namespace 'serial' (fossasia#114)
1 parent a74d48f commit 5c03e23

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

PSL/packet_handler.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,13 @@
55
import inspect
66
import serial
77

8+
# Handle namespace conflict between packages 'pyserial' and 'serial'.
9+
try:
10+
serial.Serial
11+
except AttributeError:
12+
e = "import serial failed; PSL requires 'pyserial' but conflicting package 'serial' was found."
13+
raise ImportError(e)
14+
815
import PSL.commands_proto as CP
916

1017

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy