Browse files

ok

  • Loading branch information...
1 parent 2f59cda commit fabd527f81707c906d251fca0ad045f4a40c3e1c @udlei udlei committed Jul 31, 2011
Showing with 14 additions and 1 deletion.
  1. +13 −1 bin/mdnscli
  2. +1 −0 libs/pyManDNS_Cli.py
View
14 bin/mdnscli
@@ -67,7 +67,19 @@ kwargs = dict([x for x in args._get_kwargs() if x[0] not in ('cls', 'method', 'h
if args.cls == 'domain':
domain = pyManDNS_Cli_Domain(args.host, args.port)
method = getattr(domain, args.method)
- print method(**kwargs)
+ result = method(**kwargs)
+
+ if args.method == "list":
+
+ for i in result["result"]:
+ print i["domain"]
+
+ else:
+ print result["message"]
+
+ if result["result"]:
+ print result["result"]
+
else:
print 'ERROR, the args: %s' % args
View
1 libs/pyManDNS_Cli.py
@@ -19,6 +19,7 @@ def _connect(self):
class pyManDNS_Cli_Domain(ConnectXMLRPC):
+
def _kwargs_to_args_ordenated(self, **kwargs):
# The XML-RPC doesn't accept named params. The keys are
# to ordenate the params and use as **params.

0 comments on commit fabd527

Please sign in to comment.