コード例 #1
0
ファイル: relations.py プロジェクト: pombredanne/paella-svn
    def __init__(self, conn):
        ScriptCursor.__init__(self, conn, 'machine_scripts', 'machine')
        # we need this from BaseMachineDbObject
        # but we can't call BaseMachineDbObject.__init__
        # since this class is subclassed from a cursor
        self.current_machine = None
        # we hope that having this cursor in a cursor
        # doesn't cause problems.  We really need
        # to consider turning the ScriptCursor into
        # a subclass of object and including a cursor
        # member.
        self.cursor = conn.cursor(statement=True)
        #self._parents = MachineParents(conn)

        # we don't expect to change any of the
        # scriptnames during the life of this object
        # so we make a static list to keep from
        # talking to the database everytime we
        # need this list.  If we ever make code to
        # mess with the script list, we'll need an
        # "update_scriptnames" method to update
        # this list.  This list is being used to help
        # the gui determine what scripts to look
        # for in the machine parents.  The installer
        # won't need this, since each step in the
        # installer will look for a script, but the
        # gui doesn't do that.
        self.scriptnames = self._list_scriptnames()
コード例 #2
0
ファイル: relations.py プロジェクト: umeboshi2/paella
 def __init__(self, conn):
     ScriptCursor.__init__(self, conn, 'machine_scripts', 'machine')
     # we need this from BaseMachineDbObject
     # but we can't call BaseMachineDbObject.__init__
     # since this class is subclassed from a cursor
     self.current_machine = None
     # we hope that having this cursor in a cursor
     # doesn't cause problems.  We really need
     # to consider turning the ScriptCursor into
     # a subclass of object and including a cursor
     # member.
     self.cursor = conn.cursor(statement=True)
     #self._parents = MachineParents(conn)
     
     # we don't expect to change any of the
     # scriptnames during the life of this object
     # so we make a static list to keep from
     # talking to the database everytime we
     # need this list.  If we ever make code to
     # mess with the script list, we'll need an
     # "update_scriptnames" method to update
     # this list.  This list is being used to help
     # the gui determine what scripts to look
     # for in the machine parents.  The installer
     # won't need this, since each step in the
     # installer will look for a script, but the
     # gui doesn't do that.
     self.scriptnames = self._list_scriptnames()
コード例 #3
0
 def __init__(self, conn):
     BaseMachineTypeObject.__init__(self)
     ScriptCursor.__init__(self, conn, 'machine_type_scripts',
                           'machine_type')
コード例 #4
0
ファイル: mtype.py プロジェクト: BackupTheBerlios/paella-svn
 def __init__(self, conn):
     BaseMachineTypeObject.__init__(self)
     ScriptCursor.__init__(self, conn, 'machine_type_scripts', 'machine_type')