# HG changeset patch # User Jeff Hammel # Date 1604441511 28800 # Node ID 73434c2db108606df2c0a63c5a5173c576064ad5 # Parent 8f30c2f702bc1873b3de301b7812b48bf0a02fd8 soft-deprecate validate_css method diff -r 8f30c2f702bc -r 73434c2db108 bitsyblog/utils.py --- a/bitsyblog/utils.py Tue Nov 03 14:07:56 2020 -0800 +++ b/bitsyblog/utils.py Tue Nov 03 14:11:51 2020 -0800 @@ -3,8 +3,6 @@ import cgi import datetime import os -import urllib -import urllib2 import docutils import docutils.core @@ -33,12 +31,9 @@ def validate_css(css): - """use a webservice to determine if the argument is valid css""" - url = 'http://jigsaw.w3.org/css-validator/validator?text=%s' - url = url % urllib.quote_plus(css) - foo = urllib2.urlopen(url) - text = foo.read() - return not 'We found the following errors' in text # XXX hacky + # DEPRECATED! Just return `True` for now + return True + def date(datestamp): datestamp = os.path.split(datestamp)[-1]