MCPcopy Create free account
hub / github.com/SimHacker/micropolis / getSession

Method getSession

turbogears/micropolis/controllers.py:623–645  ·  view source on GitHub ↗
(self, sessionID, args=None)

Source from the content-addressed store, hash-verified

621 # Touch the session to update its last used time.
622 #
623 def getSession(self, sessionID, args=None):
624
625 #print "GETSESSION", sessionID, args
626
627 self.expireSessions()
628
629 sessions = self.sessions
630 session = sessions.get(sessionID, None)
631 if session:
632 session.touch()
633 return session
634
635 if args == None:
636 print "ERROR: controller getSession args is None!", sessionID
637 #return None
638
639 session = micropolisturbogearsengine.Session(self, sessionID, args)
640 sessions[sessionID] = session
641
642 session.createEngine()
643 session.touch()
644
645 return session
646
647
648 ########################################################################

Callers 8

getTilesMethod · 0.95
getMapImageMethod · 0.95
getCityIconMethod · 0.95
startSessionServiceMethod · 0.95
pollServiceMethod · 0.95
all.jsFile · 0.80
all_pretty.jsFile · 0.80

Calls 4

expireSessionsMethod · 0.95
touchMethod · 0.95
createEngineMethod · 0.95
getMethod · 0.45

Tested by

no test coverage detected