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-23 09:33:00 +02:00
parent 42d0522cdd
commit a9c3bce20d
1 changed files with 1 additions and 1 deletions

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!")