|
|
@ -4,6 +4,7 @@ from argparse import ArgumentParser |
|
|
|
import json |
|
|
|
from urllib import urlencode |
|
|
|
from urllib2 import urlopen, HTTPError, URLError |
|
|
|
from common import getjson |
|
|
|
|
|
|
|
def main (args): |
|
|
|
p = ArgumentParser("call listAllPads and print the results") |
|
|
@ -22,7 +23,7 @@ def main (args): |
|
|
|
if args.showurl: |
|
|
|
print requesturl |
|
|
|
else: |
|
|
|
results = json.load(urlopen(requesturl))['data']['padIDs'] |
|
|
|
results = getjson(urlopen(requesturl))['data']['padIDs'] |
|
|
|
if args.format == "json": |
|
|
|
print json.dumps(results) |
|
|
|
else: |
|
|
|