source: products/qPloneGoogleSitemaps/tags/0.5/skins/qPloneGoogleSitemaps/ping_googlesitemaps.cpy @ 1

Last change on this file since 1 was 1, checked in by myroslav, 18 years ago

Building directory structure

File size: 620 bytes
Line 
1## Script (Python) "ping_googlesitemaps.cpy"
2##bind container=container
3##bind context=context
4##bind namespace=
5##bind script=script
6##bind subpath=traverse_subpath
7##parameters=
8##title=Ping information to Google
9##
10
11from Products.CMFCore.utils import getToolByName
12from Products.qPloneGoogleSitemaps.utils import ping_google
13
14url = getToolByName(context, 'portal_url')()
15
16portal_msg = "Google pinged. It will review your sitemap as soon as it will be able to."
17
18try:
19    ping_google(url)
20except:
21    portal_msg = "Cannot contact Google. Try again in a while."
22   
23return state.set(portal_status_message = portal_msg)
Note: See TracBrowser for help on using the repository browser.