mirror of
https://github.com/weewx/weewx.git
synced 2026-04-18 08:36:54 -04:00
Merge w/main trunk. setup now deletes the old readme.htm file.
This commit is contained in:
@@ -17,6 +17,9 @@ outside temperature drop below 40 degrees.
|
||||
|
||||
Moved the compass rose used in progressive vector plots into the interior
|
||||
of the plot.
|
||||
|
||||
Install now deletes public_html/#upstream.last, thus forcing all files to
|
||||
be uploaded to the web server at the next opportunity.
|
||||
|
||||
1.2.0 11/22/09
|
||||
|
||||
|
||||
2
TODO.txt
2
TODO.txt
@@ -1,7 +1,5 @@
|
||||
TODO before the next release:
|
||||
|
||||
Test setup.py to make sure it deletes #upstream.last
|
||||
|
||||
Add year-to-date rain feature.
|
||||
|
||||
Check example in weewxd.py of how to override the default engine
|
||||
|
||||
17
setup.py
17
setup.py
@@ -81,12 +81,29 @@ class My_install_data(install_data):
|
||||
return rv
|
||||
|
||||
def run(self):
|
||||
# Back up the old template directory if it exists
|
||||
template_dir = os.path.join(self.install_dir, 'templates')
|
||||
if os.path.exists(template_dir):
|
||||
backupdir = backup(template_dir)
|
||||
print "Backed up template subdirectory to %s" % backupdir
|
||||
|
||||
# Run the superclass's run():
|
||||
install_data.run(self)
|
||||
|
||||
# If the file #upstream.last exists, delete it, thus forcing
|
||||
# all files to be FTP'd to the server at the next opportunity.
|
||||
try:
|
||||
os.remove(os.path.join(self.install_dir, 'public_html/#upstream.last'))
|
||||
except:
|
||||
pass
|
||||
|
||||
# If the file $WEEWX_ROOT/readme.htm exists, delete it. It's
|
||||
# the old readme (since replaced with docs/readme.htm)
|
||||
try:
|
||||
os.remove('readme.htm')
|
||||
except:
|
||||
pass
|
||||
|
||||
def massageConfigFile(self, f, install_dir, **kwargs):
|
||||
"""Merges any old config file into the new one, and sets WEEWX_ROOT
|
||||
|
||||
|
||||
Reference in New Issue
Block a user