Merge branch 'development' into V5

This commit is contained in:
Tom Keffer
2023-02-20 17:34:46 -08:00
5 changed files with 21 additions and 1 deletions

View File

@@ -482,7 +482,12 @@ class AggTypeBinder(object):
def _do_query(self):
"""Run a query against the databases, using the given aggregation type."""
db_manager = self.db_lookup(self.data_binding)
try:
# Get the appropriate database manager
db_manager = self.db_lookup(self.data_binding)
except weewx.UnknownBinding:
# Don't recognize the binding.
raise AttributeError(self.data_binding)
try:
# If we cannot perform the aggregation, we will get an UnknownType or
# UnknownAggregation error. Be prepared to catch it.

View File

@@ -506,6 +506,10 @@
<td>Max Temperature in alt_binding</td>
<td>25.1&#176;F</td>
</tr>
<tr>
<td>Max Temperature with bogus binding</td>
<td>$day($data_binding='foo_binding').outTemp.max</td>
</tr>
<tr>
<td>Min temp with explicit conversion to Celsius</td>
<td>3.8&#176;C</td>

View File

@@ -506,6 +506,10 @@
<td>Max Temperature in alt_binding</td>
<td>-3.9&#176;C</td>
</tr>
<tr>
<td>Max Temperature with bogus binding</td>
<td>$day($data_binding='foo_binding').outTemp.max</td>
</tr>
<tr>
<td>Min temp with explicit conversion to Celsius</td>
<td>3.8&#176;C</td>

View File

@@ -506,6 +506,10 @@ FALSE#slurp
<td>Max Temperature in alt_binding</td>
<td>$day($data_binding='alt_binding').outTemp.max</td>
</tr>
<tr>
<td>Max Temperature with bogus binding</td>
<td>$day($data_binding='foo_binding').outTemp.max</td>
</tr>
<tr>
<td>Min temp with explicit conversion to Celsius</td>
<td>$day.outTemp.min.degree_C</td>

View File

@@ -49,6 +49,9 @@ user jocelynj! PR #842.
Fix problem that prevented wee_device --set-retransmit from working on
Vantage stations.
Using a bad data binding with an aggregation tag no longer results in an
exception. Instead, it shows the tag in the results. Related to PR #817.
### 4.10.1 01/30/2023