From 8929d365ab5f878671bec8ca3a62c77f2e156f99 Mon Sep 17 00:00:00 2001 From: Tom Keffer Date: Tue, 5 Feb 2019 16:40:09 -0800 Subject: [PATCH 1/6] Introduced option no_catchup. If set to true, a catchup will not be attempted. Fixes issue #368. --- bin/weewx/engine.py | 10 ++++++---- docs/changes.txt | 6 ++++++ 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/bin/weewx/engine.py b/bin/weewx/engine.py index 21aaf98c..1453c337 100644 --- a/bin/weewx/engine.py +++ b/bin/weewx/engine.py @@ -443,6 +443,7 @@ class StdArchive(StdService): if 'StdArchive' in config_dict: self.data_binding = config_dict['StdArchive'].get('data_binding', 'wx_binding') self.record_generation = config_dict['StdArchive'].get('record_generation', 'hardware').lower() + self.no_catchup = to_bool(config_dict['StdArchive'].get('no_catchup', False)) self.archive_delay = to_int(config_dict['StdArchive'].get('archive_delay', 15)) software_interval = to_int(config_dict['StdArchive'].get('archive_interval', 300)) self.loop_hilo = to_bool(config_dict['StdArchive'].get('loop_hilo', True)) @@ -509,10 +510,11 @@ class StdArchive(StdService): def startup(self, event): # @UnusedVariable """Called when the engine is starting up.""" - # The engine is starting up. If hardware record generation has been specified, - # the main task is to do a catch up on any - # data still on the station, but not yet put in the database. - if self.record_generation == 'hardware': + # The engine is starting up. Unless the user has specified otherwise, the main task + # is to do a catch up on any data still on the station, but not yet put in the database. + if self.no_catchup: + syslog.syslog(syslog.LOG_DEBUG, "engine: No catchup specified.") + else: # Not all consoles can do a hardware catchup, so be prepared to catch the exception: try: self._catchup(self.engine.console.genStartupRecords) diff --git a/docs/changes.txt b/docs/changes.txt index bf0d36a0..61f77e63 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -1,6 +1,12 @@ weewx change history -------------------- +3.9.1 MM/DD/YYYY + +Introduced option no_catchup. If set to true, a catchup will not be +attempted. Fixes issue #368. + + 3.9.0 02/05/2019 New skin called Seasons. For new users, it will be installed and enabled. From d55089ce073059848dcfffcb32e608a64af620f0 Mon Sep 17 00:00:00 2001 From: Matthew Wall Date: Tue, 5 Feb 2019 20:54:41 -0500 Subject: [PATCH 2/6] do not normalize path if path is None --- bin/weeplot/genplot.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/weeplot/genplot.py b/bin/weeplot/genplot.py index 234e0f1f..c0622fc5 100644 --- a/bin/weeplot/genplot.py +++ b/bin/weeplot/genplot.py @@ -131,7 +131,7 @@ class GeneralPlot(object): @staticmethod def normalize_path(skin_dir, path): - if os.path.isabs(path): + if path is None or os.path.isabs(path): return path return os.path.join(skin_dir, path) From a47535df1ee56f64d994ab2d06eb4144fb937f9e Mon Sep 17 00:00:00 2001 From: Matthew Wall Date: Tue, 5 Feb 2019 20:54:54 -0500 Subject: [PATCH 3/6] use correct permissions --- makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/makefile b/makefile index 170f6a5a..303b4621 100644 --- a/makefile +++ b/makefile @@ -282,7 +282,7 @@ release: ssh $(USER)@$(WEEWX_COM) "rm -f $(WEEWX_DOWNLOADS)/weewx*" ssh $(USER)@$(WEEWX_COM) "for f in $(ARTIFACTS); do if [ -f $(RELDIR)/\$$f ]; then ln -s released_versions/\$$f $(WEEWX_DOWNLOADS); fi; done" ssh $(USER)@$(WEEWX_COM) "if [ -f $(DEVDIR)/README.txt ]; then mv $(DEVDIR)/README.txt $(WEEWX_DOWNLOADS); fi" - ssh $(USER)@$(WEEWX_COM) "chmod 644 $(WEEWX_DOWNLOADS)/released_versions/*" + ssh $(USER)@$(WEEWX_COM) "chmod 664 $(WEEWX_DOWNLOADS)/released_versions/*" # make local copy of the published apt repository pull-apt-repo: From 5b8be278b37b6a6b2541614cef2b91d0a9c0bcb6 Mon Sep 17 00:00:00 2001 From: Matthew Wall Date: Tue, 5 Feb 2019 21:24:50 -0500 Subject: [PATCH 4/6] added note to changelog about genplot fix --- docs/changes.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/changes.txt b/docs/changes.txt index 61f77e63..241ed6f0 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -3,6 +3,8 @@ weewx change history 3.9.1 MM/DD/YYYY +In genplot, do not attempt to normalize unspecified paths. + Introduced option no_catchup. If set to true, a catchup will not be attempted. Fixes issue #368. From 95a5a71b0a6f5e7b52dd4772b9dec48e63c090ec Mon Sep 17 00:00:00 2001 From: Matthew Wall Date: Wed, 6 Feb 2019 08:22:50 -0500 Subject: [PATCH 5/6] bump version for the 3.9.1 release --- bin/weecfg/test/expected/weewx39_user_expected.conf | 2 +- bin/weewx/__init__.py | 2 +- pkg/changelog.rpm | 2 ++ pkg/debian/changelog | 3 +++ weewx.conf | 2 +- 5 files changed, 8 insertions(+), 3 deletions(-) diff --git a/bin/weecfg/test/expected/weewx39_user_expected.conf b/bin/weecfg/test/expected/weewx39_user_expected.conf index f6ef293f..8e0ba188 100644 --- a/bin/weecfg/test/expected/weewx39_user_expected.conf +++ b/bin/weecfg/test/expected/weewx39_user_expected.conf @@ -26,7 +26,7 @@ log_failure = True socket_timeout = 20 # Do not modify this - it is used by setup.py when installing and updating. -version = 3.9.0 +version = 3.9.1 ############################################################################## diff --git a/bin/weewx/__init__.py b/bin/weewx/__init__.py index 211e4e83..c4ab83d5 100644 --- a/bin/weewx/__init__.py +++ b/bin/weewx/__init__.py @@ -6,7 +6,7 @@ """Package weewx, containing modules specific to the weewx runtime engine.""" import time -__version__="3.9.0" +__version__="3.9.1" # Holds the program launch time in unix epoch seconds: # Useful for calculating 'uptime.' diff --git a/pkg/changelog.rpm b/pkg/changelog.rpm index d096f73f..72f35745 100644 --- a/pkg/changelog.rpm +++ b/pkg/changelog.rpm @@ -1,3 +1,5 @@ +* Wed Feb 06 2019 Matthew Wall (weewx) - 3.9.1-1 +- new upstream release * Tue Feb 05 2019 Matthew Wall (weewx) - 3.9.0-1 - new upstream release * Mon Jan 28 2019 Matthew Wall (weewx) - 3.9.0b3-1 diff --git a/pkg/debian/changelog b/pkg/debian/changelog index 912c6adb..e0c9c11a 100644 --- a/pkg/debian/changelog +++ b/pkg/debian/changelog @@ -1,3 +1,6 @@ +weewx (3.9.1-1) unstable; urgency=low + * new upstream release + -- Matthew Wall (weewx) Wed, 06 Feb 2019 08:21:47 -0500 weewx (3.9.0-1) unstable; urgency=low * new upstream release -- Matthew Wall (weewx) Tue, 05 Feb 2019 13:32:45 -0500 diff --git a/weewx.conf b/weewx.conf index 25e5f738..e52a6eda 100644 --- a/weewx.conf +++ b/weewx.conf @@ -23,7 +23,7 @@ log_failure = True socket_timeout = 20 # Do not modify this. It is used when installing and updating weewx. -version = 3.9.0 +version = 3.9.1 ############################################################################## From 0b380dcc59ecdaf30108d9fe2af04ae36213fa8e Mon Sep 17 00:00:00 2001 From: Tom Keffer Date: Wed, 6 Feb 2019 05:23:40 -0800 Subject: [PATCH 6/6] Simplify path logic slightly --- bin/weeplot/genplot.py | 4 ++-- docs/changes.txt | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/bin/weeplot/genplot.py b/bin/weeplot/genplot.py index c0622fc5..58a84656 100644 --- a/bin/weeplot/genplot.py +++ b/bin/weeplot/genplot.py @@ -131,8 +131,8 @@ class GeneralPlot(object): @staticmethod def normalize_path(skin_dir, path): - if path is None or os.path.isabs(path): - return path + if path is None: + return None return os.path.join(skin_dir, path) def setBottomLabel(self, bottom_label): diff --git a/docs/changes.txt b/docs/changes.txt index 241ed6f0..043c1365 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -1,7 +1,7 @@ weewx change history -------------------- -3.9.1 MM/DD/YYYY +3.9.1 02/06/2019 In genplot, do not attempt to normalize unspecified paths.