示例#1
0
def make_meeting(args):
    if args.server:
        rpc = discuss.rpc.RPCClient
    else:
        rpc = discuss.rpc.RPCLocalClient
    cl = discuss.Client(args.server, RPCClient=rpc)
    error = cl.create_mtg(args.path, args.longname, args.public)
    make_mailfeed(args)
    return discuss.Meeting(cl, args.path)
示例#2
0
def get_meeting(name):
    rcfile = discuss.RCFile()
    meeting_location = rcfile.lookup(name)
    if not meeting_location:
        sys.stderr.write("Meeting %s not found in .meetings file\n" % name)
        sys.exit(1)

    server, path = meeting_location
    client = discuss.Client(server, timeout=5)
    return discuss.Meeting(client, path)
示例#3
0
文件: ndsc.py 项目: vasilvv/ndsc
def init_meeting():
    global client, meeting, transactions

    try:
        client = discuss.Client(server, timeout=5)
        meeting = discuss.Meeting(client, path)
        transactions = list(
            meeting.transactions(feedback=ProgressDisplay().display_progress))
    except Exception as err:
        die(err.message)
示例#4
0
def add_meeting():
    if ":" in args.meeting:
        server, path = args.meeting.split(":", 2)
        if not path.startswith("/"):
            path = "/var/spool/discuss/" + path

        client = discuss.Client(server, timeout=5)
        mtg = discuss.Meeting(client, path)
    else:
        mtg = discuss.locate(args.meeting)
        if not mtg:
            die("Meeting %s was not found." % args.meeting)

    rcfile = discuss.RCFile()
    rcfile.add(mtg)
    rcfile.save()
示例#5
0
def get_local_meeting(shortname):
    rpc = discuss.rpc.RPCLocalClient
    cl = discuss.Client('localhost', RPCClient=rpc)
    return discuss.Meeting(cl, meeting_path(shortname))