Commit 0a3c1745 authored by andreasjung's avatar andreasjung

- further fixes for """AttributeError: Buildout instance has no

  attribute '_logger'""" by providing reasonable defaults 
  within the Buildout constructor (related to the new 'allow-hosts' option)
  (patch by Gottfried Ganssauge) (ajung)




git-svn-id: http://svn.zope.org/repos/main/zc.buildout/trunk@87309 62d5b8a3-27da-0310-9561-8e5933582275
parent 817a88e5
......@@ -7,6 +7,11 @@ Change History
1.0.6 (unreleased)
==================
- further fixes for """AttributeError: Buildout instance has no
attribute '_logger'""" by providing reasonable defaults
within the Buildout constructor (related to the new 'allow-hosts' option)
(patch by Gottfried Ganssauge) (ajung)
1.0.5 (2008-06-10)
==================
......
......@@ -124,16 +124,30 @@ class Buildout(UserDict.DictMixin):
self._parts = []
# provide some defaults before options are parsed
# because while parsing options those attributes might be
# used already (Gottfried Ganssauage)
self._links = ()
# used already (Gottfried Ganssauge)
buildout_section = data.get ('buildout')
links = buildout_section and buildout_section.get('find-links', '')
self._links = links and links.split() or ()
allow_hosts = buildout_section and buildout_section.get(
'allow-hosts', '*').split('\n')
self._allow_hosts = tuple([host.strip() for host in allow_hosts
if host.strip() != ''])
self._buildout_dir = os.getcwd()
self._logger = logging.getLogger('zc.buildout')
self.offline = False
self.newest = True
##################################################################
## WARNING!!!
## ALL ATTRIBUTES MUST HAVE REASONABLE DEFAULTS AT THIS POINT
## OTHERWISE ATTRIBUTEERRORS MIGHT HAPPEN ANY TIME
##################################################################
# initialize some attrs and buildout directories.
options = self['buildout']
# now reinitialize
links = options.get('find-links', '')
self._links = links and links.split() or ()
......
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