Commit 66aa6d42 authored by Leigh B. Stoller's avatar Leigh B. Stoller
Browse files

Add a method to return the mailman password (I should rename this to

collab_password). I'm using this from the event scheduler so it can
access the per-experiment DB to store the event trace.

I suppose it would have been easier to stick them in a file?
parent 3d73eff6
......@@ -585,6 +585,30 @@ class user:
# Return collab password,
def collabpassword(self, version, argdict):
if version != self.VERSION:
return EmulabResponse(RESPONSE_BADVERSION,
output="Client version mismatch!")
except NoLoginsError, e:
return EmulabResponse(RESPONSE_REFUSED, output=str(e))
res = DBQueryFatal("select mailman_password from users where uid=%s",
if len(res) == 0:
return EmulabResponse(RESPONSE_ERROR,
output="No such user!")
passwd = res[0][0]
return EmulabResponse(RESPONSE_SUCCESS, value=passwd)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment