Changeset 323
- Timestamp:
- 08/22/08 13:06:17 (3 months ago)
- Files:
-
- lamer/lamer.py (modified) (1 diff)
- lamer/mod_getmail.py (added)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
lamer/lamer.py
r107 r323 50 50 def displayAccount(self, **data): 51 51 message = [] 52 for key in ("user", "login", "email"): 52 if "protocol" in data: 53 message.append("Protocol %s: " % data["protocol"]) 54 del data["protocol"] 55 # Try to write the keys in a specific order 56 for key in ("user", "username", "login", "email", "password"): 53 57 if key not in data: 54 58 continue 55 message.append("%s=%s ," % (key, data[key]))59 message.append("%s=%s" % (key, data[key])) 56 60 del data[key] 57 break 58 if "password" in data: 59 message.append("password=%s" % data["password"]) 60 del data["password"] 61 if "protocol" in data: 62 message.insert(0, "Protocol %s: " % data["protocol"]) 63 del data["protocol"] 61 if "server" in data and "port" in data: 62 message.append("server=%s:%s" % (data["server"], data["port"])) 63 del data["server"] 64 del data["port"] 64 65 for key, value in data.iteritems(): 65 message.append(" ,%s=%s" % (key, value))66 self.write(' '.join(message))66 message.append("%s=%s" % (key, value)) 67 self.write(', '.join(message)) 67 68
