瀏覽代碼

Update to use Python 3

Minor updates to use Python 3 which is now required for WeeWx 4.0.0
Josh Smith 4 年之前
父節點
當前提交
38de7b9aab
共有 1 個文件被更改,包括 2 次插入3 次删除
  1. 2 3
      bin/user/historygenerator.py

+ 2 - 3
bin/user/historygenerator.py

@@ -5,7 +5,7 @@
 #
 #
 """Extends the Cheetah generator search list to add html historic data tables in a nice colour scheme.
 """Extends the Cheetah generator search list to add html historic data tables in a nice colour scheme.
 
 
-Tested on Weewx release 3.8.2.
+Tested on Weewx release 4.0.0.
 Works with all databases.
 Works with all databases.
 Observes the units of measure and display formats specified in skin.conf.
 Observes the units of measure and display formats specified in skin.conf.
 
 
@@ -199,7 +199,7 @@ class MyXSearch(SearchList):
 
 
         font_color_list = table_options['fontColours'] if 'fontColours' in table_options else ['#000000'] * l
         font_color_list = table_options['fontColours'] if 'fontColours' in table_options else ['#000000'] * l
 
 
-        return zip(table_options['minvalues'], table_options['maxvalues'], table_options['colours'], font_color_list)
+        return list(zip(table_options['minvalues'], table_options['maxvalues'], table_options['colours'], font_color_list))
 
 
 
 
     def _statsHTMLTable(self, table_options, table_stats, table_name, binding, NOAA=False):
     def _statsHTMLTable(self, table_options, table_stats, table_name, binding, NOAA=False):
@@ -394,4 +394,3 @@ class MyXSearch(SearchList):
                    (dt.strftime(table_options['year_filename']), dt.strftime("%Y"))
                    (dt.strftime(table_options['year_filename']), dt.strftime("%Y"))
 
 
         return cellText
         return cellText
-