Commit 6a92d06a authored by Nicolas Wavrant's avatar Nicolas Wavrant

Revert "librecipe: new function in GenericBaseRecipe to get value from previous buildout run"

Reading the .installed.cfg file is not the correct way of storing values. The publish_early
recipe should be used instead

This reverts commit 8787716d.
parent 1e61ac26
......@@ -26,7 +26,6 @@
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
import ConfigParser
import io
import logging
import os
......@@ -283,18 +282,3 @@ class GenericBaseRecipe(object):
except:
shutil.rmtree(destination)
raise
def getValueFromPreviousRun(self, section, parameter):
"""
Returns the value of a parameter from a previous run, if it exists.
Otherwise, returns None
"""
if os.path.exists(self.buildout['buildout']['installed']):
with open(self.buildout['buildout']['installed']) as config_file:
try:
parser = ConfigParser.RawConfigParser()
parser.readfp(config_file)
return parser.get(section, parameter)
except:
pass
return None
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment