Require requests > 1.0.4

This changes the API slightly, since json is now a method, not a property.
This commit is contained in:
Aldo Cortesi 2012-12-31 12:23:42 +13:00
parent 781592d6c0
commit b07ab253b7
3 changed files with 4 additions and 4 deletions

View File

@ -30,7 +30,7 @@ class Daemon:
Return some basic info about the remote daemon. Return some basic info about the remote daemon.
""" """
resp = requests.get("%s/api/info"%self.urlbase, verify=False) resp = requests.get("%s/api/info"%self.urlbase, verify=False)
return resp.json return resp.json()
def last_log(self): def last_log(self):
""" """
@ -47,7 +47,7 @@ class Daemon:
Return the log buffer as a list of dictionaries. Return the log buffer as a list of dictionaries.
""" """
resp = requests.get("%s/api/log"%self.urlbase, verify=False) resp = requests.get("%s/api/log"%self.urlbase, verify=False)
return resp.json["log"] return resp.json()["log"]
def clear_log(self): def clear_log(self):
""" """

2
pathod
View File

@ -166,7 +166,7 @@ if __name__ == "__main__":
group = parser.add_argument_group( group = parser.add_argument_group(
'Controlling Logging', 'Controlling Logging',
""" """
Some of these options expand generated values for logging - if Some of these options expand generated values for logging - if
you're generating large data, use them with caution. you're generating large data, use them with caution.

View File

@ -89,5 +89,5 @@ setup(
"Topic :: Software Development :: Testing :: Traffic Generation", "Topic :: Software Development :: Testing :: Traffic Generation",
"Topic :: Internet :: WWW/HTTP", "Topic :: Internet :: WWW/HTTP",
], ],
install_requires=['netlib>=0.2.2', "requests>=0.13", "flask"], install_requires=['netlib>=0.2.2', "requests>=1.0.4", "flask"],
) )