def md_name (cls, message = None) : t = int (time.time ()) p = sos.getpid () n = cls._deliveries.setdefault (t, 0) h = TFL.Environment.hostname cls._deliveries [t] += 1 return cls._md_name (t, p, n, h)
def _new_edit_session (self, response, ttl = None) : dbmd = self.top.scope.db_meta_data user = response.user if user is None : u_hash = response.username = uuid.uuid1 ().hex else : u_hash = user.password return response.session.new_edit_session \ ((u_hash, dbmd.dbv_hash, dbmd.dbid, sos.getpid ()), ttl)
def md_name (cls, message = None) : if message is None : return super (Maildir, cls).md_name () else : r = cls.name_split (message.name) try : t = int (r.time) except (TypeError, ValueError) : t = int (time.time ()) try : p = int (r.proc) except (TypeError, ValueError) : p = sos.getpid () try : n = int (r.deli) except (TypeError, ValueError) : n = cls._deliveries.setdefault (t, 0) cls._deliveries [t] += 1 return cls._md_name (t, p, n, r.host or TFL.Environment.hostname)