forked from Archive/PX4-Autopilot
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:
parent
42d0522cdd
commit
a9c3bce20d
|
@ -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!")
|
||||
|
|
Loading…
Reference in New Issue