Index: sitescripts/crawler/bin/import_sites.py |
=================================================================== |
--- a/sitescripts/crawler/bin/import_sites.py |
+++ b/sitescripts/crawler/bin/import_sites.py |
@@ -29,17 +29,17 @@ def _get_db(): |
else: |
return MySQLdb.connect(user=dbuser, passwd=dbpasswd, db=database, |
use_unicode=True, charset="utf8") |
def _get_cursor(): |
return _get_db().cursor(MySQLdb.cursors.DictCursor) |
def _hg(args): |
- return subprocess.Popen(["hg"] + args, stdout = subprocess.PIPE) |
+ return subprocess.check_output(["hg"] + args) |
def _extract_sites(easylist_dir): |
os.chdir(easylist_dir) |
process = _hg(["log", "--template", "{desc}\n"]) |
urls = set([]) |
for line in process.stdout: |
match = re.search(r"\b(https?://\S*)", line) |