mirror of
https://github.com/weewx/weewx.git
synced 2026-04-18 16:46:56 -04:00
wunderfixer option --test now requires api_key and password.
Then goes ahead with querying the WU.
This commit is contained in:
7
TODO.md
7
TODO.md
@@ -1,6 +1,9 @@
|
||||
# To do
|
||||
|
||||
Need to add `python3-distutils` to the required package list in `debian/control`.
|
||||
Should Ultimeter driver actually emit `rain24` and `dayRain`? See
|
||||
this email thread: https://groups.google.com/forum/#!topic/weewx-user/FM9QANjo1cc
|
||||
|
||||
# For Version 4.1
|
||||
Implement a `$gettext()` extension.
|
||||
Implement a `$gettext()` extension.
|
||||
|
||||
Be able to add arbitrary lines to graphics.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/usr/bin/env python
|
||||
# ===============================================================================
|
||||
# Copyright (c) 2009-2019 Tom Keffer <tkeffer@gmail.com>
|
||||
# Copyright (c) 2009-2020 Tom Keffer <tkeffer@gmail.com>
|
||||
#
|
||||
# This software may be used and redistributed under the
|
||||
# terms of the GNU General Public License version 3.0
|
||||
@@ -36,6 +36,7 @@ CHANGE HISTORY
|
||||
1.9.1 05/02/2020
|
||||
Fixed problem under Python 3 where response was not converted to str before attempting
|
||||
to parse the JSON.
|
||||
Option --test now requires api_key and password, then goes ahead with querying the WU.
|
||||
|
||||
1.9.0 02/10/2020
|
||||
With response code of 204, changed the default to assume a good station with no data
|
||||
@@ -214,16 +215,16 @@ def main():
|
||||
try:
|
||||
if not options.station:
|
||||
options.station = config_dict['StdRESTful']['Wunderground']['station']
|
||||
if not options.password and not options.simulate:
|
||||
if not options.password:
|
||||
options.password = config_dict['StdRESTful']['Wunderground']['password']
|
||||
if not options.api_key and not options.simulate:
|
||||
if not options.api_key:
|
||||
options.api_key = config_dict['StdRESTful']['Wunderground']['api_key']
|
||||
except KeyError:
|
||||
log.error("Missing Wunderground station, password, and/or api_key")
|
||||
exit("Missing Wunderground station, password, and/or api_key")
|
||||
|
||||
# exit if any essential arguments are not present
|
||||
if not options.station or (not options.password and not options.api_key and not options.simulate):
|
||||
if not options.station or not options.password or not options.api_key:
|
||||
print("Missing argument(s).\n")
|
||||
print(parser.parse_args(["--help"]))
|
||||
log.error("Missing argument(s). Wunderfixer exiting.")
|
||||
@@ -232,8 +233,10 @@ def main():
|
||||
# get our binding and database and say what we are using
|
||||
db_binding = options.binding
|
||||
database = config_dict['DataBindings'][db_binding]['database']
|
||||
print("Using database binding '%s', which is bound to database '%s'" % (db_binding, database))
|
||||
log.info("Using database binding '%s', which is bound to database '%s'" % (db_binding, database))
|
||||
print("Using database binding '%s', which is bound to database '%s'"
|
||||
% (db_binding, database))
|
||||
log.info("Using database binding '%s', which is bound to database '%s'"
|
||||
% (db_binding, database))
|
||||
|
||||
# get the manager object for our db_binding
|
||||
dbmanager_t = weewx.manager.open_manager_with_config(config_dict, db_binding)
|
||||
|
||||
@@ -3,13 +3,15 @@ weewx change history
|
||||
|
||||
4.0.1 MM/DD/YYYY
|
||||
|
||||
Added a logging handler for rotating files.
|
||||
Added a logging handler for rotating files. See https://bit.ly/2StYSHb for how
|
||||
to use it.
|
||||
|
||||
More information if an exception is raised while querying for vantage hardware
|
||||
type.
|
||||
|
||||
Fixed wunderfixer problem under Python 3 where response was not converted to
|
||||
str before attempting to parse the JSON.
|
||||
wunderfixer: fixed problem under Python 3 where response was not converted to
|
||||
str before attempting to parse the JSON. Option --simulate now requires api_key
|
||||
and password, so it can hit the WU.
|
||||
|
||||
Fixed problem in te923 driver under Python 3 that caused it to crash.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user