Skip to content

Commit 04c6bfc

Browse files
committed
Clean up indentation and help message.
1 parent c85200e commit 04c6bfc

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

bin/cwutil

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,9 +82,7 @@ def put(namespace, metric_name, dimensions=None, value=None, unit=None, statisti
8282
"""
8383

8484
def simplify(lst):
85-
if len(lst) == 1:
86-
return lst[0]
87-
return lst
85+
return lst[0] if len(lst) == 1 else lst
8886

8987
print cw.put_metric_data(namespace, simplify(metric_name.split(';')),
9088
dimensions = simplify(map(_parse_dict, dimensions.split(';'))) if dimensions else None,
@@ -109,7 +107,7 @@ def help(fnc=None):
109107
sys.exit(2)
110108
(args, varargs, varkw, defaults) = inspect.getargspec(cmd)
111109
print cmd.__doc__
112-
print "Usage: %s %s" % (fnc, " ".join([ "[%s]" % a for a in args[1:]]))
110+
print "Usage: %s %s" % (fnc, " ".join([ "[%s]" % a for a in args]))
113111
else:
114112
print "Usage: cwutil [command]"
115113
for cname in dir(self):

0 commit comments

Comments
 (0)