~marceloshima/tacix/0.1

« back to all changes in this revision

Viewing changes to tacix/server/manager.py

  • Committer: Marcelo Boveto Shima
  • Date: 2009-08-06 04:39:10 UTC
  • Revision ID: mshima@sempron-20090806043910-elbliq3p80b9tgg5
Lots of fixes

Show diffs side-by-side

added added

removed removed

Lines of Context:
123
123
        logger.debug ("Looking for session %s" % ck_session_id)
124
124
        for session in self.manager_sessions.values():
125
125
            logger.debug ("Comparing %s" % session.ck_session_id)
126
 
            if session.ck_session_id == "/org/freedesktop/ConsoleKit/" + ck_session_id:
 
126
            if session.ck_session_id == ck_session_id:
127
127
                return session
128
128
        return None
129
129
 
130
 
    def _get_sessions_by_type(self, type):
131
 
        sessions = {}
 
130
    def _get_sessions_for_type(self, type):
 
131
        sessions = []
132
132
        for session in self.manager_sessions.values():
133
 
            if session.type == type:
134
 
                sessions[session.get_property('display')] = session
 
133
            if session.get_property('seat-type') == type:
 
134
                sessions.append (session)
135
135
        return sessions
136
136
 
137
137
    def __create_session(self, type, sender, guest_session=False, effective_user=None, ck_session=None, display_parameters=None):