def checkMaxSessions(self, nMax=None):
if nMax is None:<EOL><INDENT>nMax = self.opts['<STR_LIT>']<EOL><DEDENT>l = self.stateNames()<EOL>if len(l) > nMax:<EOL><INDENT>for f in l[:len(l) - nMax]:<EOL><INDENT>self.tmp_dir_session.remove(str(f))<EOL><DEDENT><DEDENT>
check whether max. number of saved sessions is reached
if: remove the oldest session