예제 #1
0
파일: ui.py 프로젝트: pboyd/passwdr
    def _command_add(self, args):
        if len(args.args) < 3:
            print "usage: add account_key username password [note]"
            return

        account = Account(args.args[0], args.key)
        account.setUsername(args.args[1])
        account.setPassword(args.args[2])
        if len(args.args) > 3:
            account.setNote(args.args[3])

        kernel.queue(events.NewAccount(account))