commands: add "version_info" cmd
example:
```
$ ./run_electrum -o version_info
{
"aiohttp.version": "3.8.1",
"aiorpcx.version": "0.22.1",
"certifi.version": "2021.10.08",
"cryptodome.version": null,
"cryptography.path": "/home/user/.local/lib/python3.8/site-packages/cryptography",
"cryptography.version": "3.4.6",
"dnspython.version": "2.2.0",
"electrum.path": "/home/user/wspace/electrum/electrum",
"electrum.version": "4.2.1",
"hidapi.version": "0.11.0.post2",
"libsecp256k1.path": "/home/user/wspace/electrum/electrum/libsecp256k1.so.0",
"libusb.path": "libusb-1.0.so",
"libusb.version": "1.0.23.11397",
"libzbar.path": "/home/user/wspace/electrum/electrum/libzbar.so.0",
"pyaes.version": "1.3.0",
"pyqt.path": "/usr/lib/python3/dist-packages/PyQt5",
"pyqt.version": "5.14.1",
"qt.version": "5.12.8"
}
```
This commit is contained in:
@@ -102,5 +102,11 @@ def find_system_cameras() -> Mapping[str, str]:
|
||||
return devices
|
||||
|
||||
|
||||
def version_info() -> Mapping[str, Optional[str]]:
|
||||
return {
|
||||
"libzbar.path": libzbar._name if libzbar else None,
|
||||
}
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
print(scan_barcode())
|
||||
|
||||
Reference in New Issue
Block a user