mirror of
https://github.com/weewx/weewx.git
synced 2026-06-10 10:05:20 -04:00
Merge pull request #70 from gjr80/master
More informative error message if unit systems differ
This commit is contained in:
@@ -634,9 +634,10 @@ class Manager(object):
|
||||
|
||||
if self.std_unit_system is not None:
|
||||
if unit_system != self.std_unit_system:
|
||||
raise weewx.UnitError("Unit system of incoming record (0x%x) "\
|
||||
"differs from the archive database (0x%x)" %
|
||||
(unit_system, self.std_unit_system))
|
||||
raise weewx.UnitError("Unit system of incoming record (0x%02x) "\
|
||||
"differs from '%s' table in '%s' database (0x%02x)" %
|
||||
(unit_system, self.table_name, self.database_name,
|
||||
self.std_unit_system))
|
||||
else:
|
||||
# This is the first record. Remember the unit system to
|
||||
# check against subsequent records:
|
||||
|
||||
Reference in New Issue
Block a user