mirror of
https://github.com/meshtastic/python.git
synced 2025-12-31 03:47:55 -05:00
add --version cli flag
This commit is contained in:
@@ -11,6 +11,7 @@ import pyqrcode
|
||||
import traceback
|
||||
import codecs
|
||||
import base64
|
||||
import pkg_resources
|
||||
|
||||
"""The command line arguments"""
|
||||
args = None
|
||||
@@ -349,6 +350,8 @@ def main():
|
||||
|
||||
parser.set_defaults(router=None)
|
||||
|
||||
parser.add_argument('--version', action='version', version=f"{pkg_resources.require('meshtastic')[0].version}")
|
||||
|
||||
global args
|
||||
args = parser.parse_args()
|
||||
logging.basicConfig(level=logging.DEBUG if args.debug else logging.INFO)
|
||||
|
||||
Reference in New Issue
Block a user