mirror of
https://github.com/kk7ds/chirp
synced 2026-08-13 17:51:36 -04:00
Revert r2380 since it removed logging the current version.
Related to #2347
This commit is contained in:
parent
5dc6ae8292
commit
344f1129ed
2 changed files with 5 additions and 15 deletions
9
chirpc
9
chirpc
|
|
@ -19,14 +19,10 @@
|
|||
import serial
|
||||
import sys
|
||||
import argparse
|
||||
import logging
|
||||
|
||||
from chirp import logger
|
||||
from chirp import *
|
||||
from chirp import chirp_common, errors, idrp, directory, util
|
||||
|
||||
LOG = logging.getLogger("chirpc")
|
||||
|
||||
def fail_unsupported():
|
||||
print "Operation not supported by selected radio"
|
||||
sys.exit(1)
|
||||
|
|
@ -66,7 +62,6 @@ class DTCSPolarityAction(argparse.Action):
|
|||
|
||||
if __name__ == "__main__":
|
||||
parser = argparse.ArgumentParser()
|
||||
logger.add_version_argument(parser)
|
||||
parser.add_argument("-s", "--serial", dest="serial",
|
||||
default="mmap",
|
||||
help="Serial port (default: mmap)")
|
||||
|
|
@ -156,10 +151,8 @@ if __name__ == "__main__":
|
|||
action="store_true",
|
||||
default=False,
|
||||
help="Upload memory map to radio")
|
||||
logger.add_arguments(parser)
|
||||
parser.add_argument("args", metavar="arg", nargs='*',
|
||||
help="Some commands require additional arguments")
|
||||
|
||||
if len(sys.argv) <= 1:
|
||||
parser.print_help()
|
||||
sys.exit(0)
|
||||
|
|
@ -167,8 +160,6 @@ if __name__ == "__main__":
|
|||
options = parser.parse_args()
|
||||
args = options.args
|
||||
|
||||
logger.handle_options(options)
|
||||
|
||||
if options.list_radios:
|
||||
print "Supported Radios:\n\t", "\n\t".join(sorted(RADIOS.keys()))
|
||||
sys.exit(0)
|
||||
|
|
|
|||
11
chirpw
11
chirpw
|
|
@ -17,9 +17,8 @@
|
|||
|
||||
import os
|
||||
|
||||
from chirp import logger
|
||||
from chirp import elib_intl
|
||||
from chirp import platform
|
||||
from chirp import platform, CHIRP_VERSION
|
||||
from chirpui import config
|
||||
|
||||
# Hack to setup environment
|
||||
|
|
@ -41,6 +40,10 @@ elif not os.isatty(0):
|
|||
sys.stdout = log
|
||||
sys.stderr = log
|
||||
|
||||
print "CHIRP %s on %s (Python %s)" % (CHIRP_VERSION,
|
||||
platform.get_platform().os_version_string(),
|
||||
sys.version.split()[0])
|
||||
|
||||
execpath = platform.get_platform().executable_path()
|
||||
localepath = os.path.abspath(os.path.join(execpath, "locale"))
|
||||
if not os.path.exists(localepath):
|
||||
|
|
@ -124,14 +127,10 @@ from chirpui import mainapp, config
|
|||
|
||||
parser = argparse.ArgumentParser()
|
||||
parser.add_argument("files", metavar="file", nargs='*', help="File to open")
|
||||
logger.add_version_argument(parser)
|
||||
parser.add_argument("--profile", action="store_true",
|
||||
help="Enable profiling")
|
||||
logger.add_arguments(parser)
|
||||
args = parser.parse_args()
|
||||
|
||||
logger.handle_options(args)
|
||||
|
||||
a = mainapp.ChirpMain()
|
||||
|
||||
for i in args.files:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue