px_uploader.py: fix version check

Presumably older versions of pyserial do not implement __version__ but
only VERSION, so we need to check for that as well.
This commit is contained in:
Julian Oes
2019-04-24 14:47:10 +02:00
parent 42d0522cdd
commit a9c3bce20d
+1 -1
View File
@@ -728,7 +728,7 @@ def main():
# We need to check for pyserial because the import itself doesn't
# seem to fail, at least not on macOS.
try:
if serial.__version__:
if serial.__version__ or serial.VERSION:
pass
except:
print("Error: pyserial not installed!")