Implemented blueprints https://blueprints.launchpad.net/appy/+spec/gen-create-root-objects, https://blueprints.launchpad.net/appy/+spec/gen-get-flavour and https://blueprints.launchpad.net/appy/+spec/pod-define-variables
This commit is contained in:
parent
ec17f900a6
commit
10eea7d735
19 changed files with 1770 additions and 1644 deletions
|
@ -46,3 +46,15 @@ class Traceback:
|
|||
get = staticmethod(get)
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
def getOsTempFolder():
|
||||
tmp = '/tmp'
|
||||
if os.path.exists(tmp) and os.path.isdir(tmp):
|
||||
res = tmp
|
||||
elif os.environ.has_key('TMP'):
|
||||
res = os.environ['TMP']
|
||||
elif os.environ.has_key('TEMP'):
|
||||
res = os.environ['TEMP']
|
||||
else:
|
||||
raise "Sorry, I can't find a temp folder on your machine."
|
||||
return res
|
||||
# ------------------------------------------------------------------------------
|
||||
|
|
|
@ -85,11 +85,12 @@ class XmlParser(ContentHandler, ErrorHandler):
|
|||
'''Basic XML content handler that does things like :
|
||||
- remembering the currently parsed element;
|
||||
- managing namespace declarations.'''
|
||||
def __init__(self, env, caller=None):
|
||||
def __init__(self, env=None, caller=None):
|
||||
'''p_env should be an instance of a class that inherits from
|
||||
XmlEnvironment: it specifies the environment to use for this SAX
|
||||
parser.'''
|
||||
ContentHandler.__init__(self)
|
||||
if not env: env = XmlEnvironment()
|
||||
self.env = env
|
||||
self.env.parser = self
|
||||
self.caller = caller # The class calling this parser
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue