Merge w/main trunk. setup now deletes the old readme.htm file.

This commit is contained in:
Tom Keffer
2009-12-21 15:03:44 +00:00
parent 7da158e9fd
commit ac778bc81d
3 changed files with 20 additions and 2 deletions

View File

@@ -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

View File

@@ -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

View File

@@ -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