import HTMLParser
import sys
import os
+import socket
import time
import tempfile
import base64
if makepickle is None:
makepickle = "/var/cache/edb/metadata.idx.most_recent"
- conn,protocol,address,params,headers = create_conn(baseurl, conn)
+ try:
+ conn, protocol, address, params, headers = create_conn(baseurl, conn)
+ except socket.error, e:
+ # ftplib.FTP(host) can raise errors like this:
+ # socket.error: (111, 'Connection refused')
+ sys.stderr.write("!!! %s\n" % (e,))
+ return {}
+
out = sys.stdout
try:
metadatafile = open("/var/cache/edb/remote_metadata.pickle")