KennethWilke/PingdomLib — pull request #7 by demophoon (2014-07-02 04:51:33+00:00)
Title: Cleaned up codebase and changed "from" keyword argument.

I fixed some various errors with the codebase such as typos, missing imports, and unused variables.

I also proposed a fix for using from as a keyword argument since from is a reserved keyword.
See this code to reproduce bug:

from datetime import datetime
from calendar import timegm
from pingdomlib.pingdom import Pingdom

username = "username"
password = "password"
api_key = "api_key"

pingdom = Pingdom(username, password, api_key)
checks = pingdom.getChecks()

# 'from' is a reserved keyword and will not work as a keyword argument
outages = checks[0].outages(
# Should have a syntax error on the line below.
from=timegm(datetime.utcnow().utctimetuple()) - 86400,
to=timegm(datetime.utcnow().utctimetuple())
)

By using `from_` instead of `from` we can get around the syntax error caused by using `from` as a keyword argument.