~unity-2d-team/unity-2d/Shell-MultiMonitor

« back to all changes in this revision

Viewing changes to grackle-put-message

  • Committer: William Grant
  • Date: 2012-01-22 10:33:21 UTC
  • Revision ID: william.grant@canonical.com-20120122103321-79m4gov8cntyxpy2
grackle-create-instance can now create the keyspace too.

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
import sys
3
3
from grackle import client
4
4
 
5
 
 
6
5
class UserError(Exception):
7
6
    """An error caused by a user mistake."""
8
7
 
9
 
 
10
8
def main(*args):
11
 
    if len(args) != 2:
 
9
    if len(args) != 1:
12
10
        raise UserError("Wrong number of arguments supplied.")
13
 
    grackle = client.GrackleClient('localhost', 8123)
14
 
    grackle.put_message(args[0], args[1], sys.stdin)
 
11
    client.put_message(args[0], sys.stdin)
15
12
 
16
13
 
17
14
if __name__ == '__main__':