def GetTreeStatusReason():
    'Fetches the tree status from a json url and returns the message\n  with the reason for the tree to be opened or closed.'
    url = settings.GetTreeStatusUrl()
    json_url = urlparse.urljoin(url, '/current?format=json')
    connection = urllib2.urlopen(json_url)
    status = json.loads(connection.read())
    connection.close()
    return status['message']
Fetches the tree status from a json url and returns the message
with the reason for the tree to be opened or closed.
def GetTreeStatusReason():
    'Fetches the tree status from a json url and returns the message\n  with the reason for the tree to be opened or closed.'
    url = settings.GetTreeStatusUrl()
    json_url = urlparse.urljoin(url, '/current?format=json')
    connection = urllib2.urlopen(json_url)
    status = json.loads(connection.read())
    connection.close()
    return status['message']