"""Change the web_page_url scheme to https for all lists. Save as bin/https.py Run via bin/withlist -a -r https The standard fix_url.py script can do this and also update host_name if necessary after changing DEFAULT_URL_PATTERN, but in an environment with multiple virtual domains, fix_url must be run separately for each domain. This script will do all lists at once without regard to domain. """ import re def https(mlist): if not mlist.Locked(): mlist.Lock() if re.search('^http:', mlist.web_page_url): mlist.web_page_url = re.sub('^http:', 'https:', mlist.web_page_url) print('list: %s: changed web_page_url to %s' % (mlist.real_name, mlist.web_page_url)) mlist.Save() mlist.Unlock()