Normalized whitespaces.
1. Removed all trailing spaces.
2. Ensured all files end with EOL.
3. Turned tabs into spaces.
diff --git a/tools/cli/packagescripts/setup.py b/tools/cli/packagescripts/setup.py
index d2b3cc9..3351d0a 100644
--- a/tools/cli/packagescripts/setup.py
+++ b/tools/cli/packagescripts/setup.py
@@ -51,7 +51,7 @@
'Topic :: Software Development :: Build Tools',
# Pick your license as you wish (should match "license" above)
- 'License :: OSI Approved :: Apache 2.0 License',
+ 'License :: OSI Approved :: Apache 2.0 License',
# Specify the Python versions you support here. In particular, ensure
# that you indicate whether you support Python 2, Python 3 or both.
diff --git a/tools/cli/wskactivation.py b/tools/cli/wskactivation.py
index 791959c..9aae198 100644
--- a/tools/cli/wskactivation.py
+++ b/tools/cli/wskactivation.py
@@ -34,7 +34,7 @@
lastTime = 0
#
-# 'wsk activations' CLI
+# 'wsk activations' CLI
#
class Activation(Item):
@@ -136,7 +136,7 @@
'namespace': urllib.quote(namespace),
'id': aid
}
-
+
res = request('GET', url, auth=args.auth, verbose=args.verbose)
if res.status == httplib.OK:
@@ -158,7 +158,7 @@
}
res = request('GET', url, auth=args.auth, verbose=args.verbose)
-
+
if res.status == httplib.OK:
result = json.loads(res.read())
logs = result['logs']
@@ -174,7 +174,7 @@
name = args.name if args.name else '/_'
args.name = getQName(name, '_') # kludge: use default namespace unless explicitly specified
print 'Hit Ctrl-C to exit.'
- try:
+ try:
self.console(args, props)
except KeyboardInterrupt:
print ''
@@ -216,7 +216,7 @@
d = timedelta(seconds=args.since_secs, minutes=args.since_mins, hours=args.since_hrs, days=args.since_days)
e = datetime(1970, 1, 1)
lastTime = int((n-d-e).total_seconds()*1000)
-
+
reported = set()
localStartTime = int(time.time())
print 'Polling for logs'
@@ -260,7 +260,7 @@
# fetch all activations starting from SLACK_SECONDS seconds in the past
if beginMillis > SLACK_SECONDS * 1000:
beginMillis = beginMillis - (SLACK_SECONDS * 1000);
-
+
a = copy.deepcopy(args)
a.name = args.name
a.full = True
@@ -285,7 +285,7 @@
#
# Print all the logs for an activation record
-#
+#
# auth: whisk auth key
#
def printLogsForActivation(activation):
@@ -301,7 +301,7 @@
lastTime = activation['start']
#
# Print all the logs for a list of activation records
-#
+#
# L: set of activation records
# reported: set of ids already reported to the user
#
diff --git a/tools/cli/wskitem.py b/tools/cli/wskitem.py
index 933f159..788855f 100644
--- a/tools/cli/wskitem.py
+++ b/tools/cli/wskitem.py
@@ -30,7 +30,7 @@
name = False
collection = False
-
+
# @param name: the singular form of the noun -- used on the command line
# @parma collection: the plural form of the noun -- used in REST APIs
def __init__(self, name, collection):
@@ -123,7 +123,7 @@
def put(self, args, props, update, payload):
res = self.httpPut(args, props, update, payload)
return self.putResponse(res, update)
-
+
def get(self, args, props):
res = self.httpGet(args, props)
if res.status == httplib.OK:
@@ -185,7 +185,7 @@
'name': self.getSafeName(pname),
'update': '?overwrite=true' if update else ''
}
-
+
headers= {
'Content-Type': 'application/json'
}
@@ -208,7 +208,7 @@
'collection': self.collection,
'name': self.getSafeName(pname)
}
-
+
return request('GET', url, auth=args.auth, verbose=args.verbose)
# returns the HTTP response for deleting an item.
diff --git a/tools/cli/wskpackage.py b/tools/cli/wskpackage.py
index e151b13..cf20abe 100644
--- a/tools/cli/wskpackage.py
+++ b/tools/cli/wskpackage.py
@@ -43,18 +43,18 @@
subcmd.add_argument('-a', '--annotation', help='annotations', nargs=2, action='append')
subcmd.add_argument('-p', '--param', help='default parameters', nargs=2, action='append')
subcmd.add_argument('--shared', nargs='?', const='yes', choices=['yes', 'no'], help='shared action (default: private)')
-
+
subcmd = parser.add_parser('bind', help='bind parameters to the package')
subcmd.add_argument('package', help='the name of the package')
subcmd.add_argument('name', help='the name of the bound package')
addAuthenticatedCommand(subcmd, props)
subcmd.add_argument('-a', '--annotation', help='annotations', nargs=2, action='append')
subcmd.add_argument('-p', '--param', help='default parameters', nargs=2, action='append')
-
+
subcmd = parser.add_parser('refresh', help='refresh package bindings')
subcmd.add_argument('name', nargs='?', help='the namespace to refresh')
addAuthenticatedCommand(subcmd, props)
-
+
self.addDefaultCommands(parser, props)
def cmd(self, args, props):
@@ -88,7 +88,7 @@
sys.exit(1)
binding = { 'namespace': pkgNamespace, 'name': pkgName }
payload = {
- 'binding': binding,
+ 'binding': binding,
'annotations': getAnnotations(args),
'parameters': getParams(args)
}
@@ -110,7 +110,7 @@
'apibase': apiBase(props),
'namespace': urllib.quote(namespace)
}
-
+
res = request('POST', url, auth=args.auth, verbose=args.verbose)
if res.status == httplib.OK:
result = json.loads(res.read())
@@ -129,8 +129,8 @@
result = json.loads(res.read())
print 'error: %(error)s' % {'error': result['error']}
return responseError(res)
-
-
+
+
def formatListEntity(self, e):
ns = e['namespace']
name = getQName(e['name'], ns)
diff --git a/tools/cli/wskrule.py b/tools/cli/wskrule.py
index a23144f..8ac7f65 100644
--- a/tools/cli/wskrule.py
+++ b/tools/cli/wskrule.py
@@ -117,9 +117,9 @@
'namespace': urllib.quote(namespace),
'name': self.getSafeName(pname)
}
-
+
res = request('GET', url, auth=args.auth, verbose=args.verbose)
-
+
if res.status == httplib.OK:
result = json.loads(res.read())
print 'ok: rule %(name)s is %(status)s' % { 'name': args.name, 'status': result['status'] }
diff --git a/tools/cli/wskutil.py b/tools/cli/wskutil.py
index 07b4870..4d74ad0 100644
--- a/tools/cli/wskutil.py
+++ b/tools/cli/wskutil.py
@@ -59,11 +59,11 @@
conn = httplib.HTTPSConnection(url.netloc, context=ssl._create_unverified_context())
else:
conn = httplib.HTTPSConnection(url.netloc)
-
+
if auth != None:
auth = base64.encodestring(auth).replace('\n', '')
headers['Authorization'] = 'Basic %s' % auth
-
+
if verbose:
print '========'
print 'REQUEST:'
@@ -82,7 +82,7 @@
body = res.read()
except httplib.IncompleteRead as e:
body = e.partial
-
+
# patch the read to return just the body since the normal read
# can only be done once
res.read = lambda: body