mirror of
https://gitee.com/xiaohuolufeihua/bizhang_-obav.git
synced 2026-05-22 01:12:31 +00:00
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:
@@ -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!")
|
||||
|
||||
Reference in New Issue
Block a user