Skip to content

Instantly share code, notes, and snippets.

@ale-rt
Created January 3, 2014 16:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ale-rt/8240778 to your computer and use it in GitHub Desktop.
Save ale-rt/8240778 to your computer and use it in GitHub Desktop.
def plonereload(user="admin", password='admin'):
''' Reload Plone
'''
from requests import get
from lxml.html import fromstring
auth = (user, password)
response = get('http://localhost:7081/reload?action=code', auth=auth)
try:
print fromstring(response.text).find('.//pre').text
except:
print response.status_code
print
print response.text
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment