c772b661d511170e208547b98ecd815521ec1309 max Wed Jan 3 16:57:37 2024 -0800 adding ga4 special code to cartEmptyShell, refs #30725 diff --git src/hg/pyLib/hgLib3.py src/hg/pyLib/hgLib3.py index c79db70..c188d35 100644 --- src/hg/pyLib/hgLib3.py +++ src/hg/pyLib/hgLib3.py @@ -480,36 +480,35 @@ return host = cfgOption("bottleneck.host") port = cfgOption("bottleneck.port") if not host or not port or not ip: return botCheckString = getBotCheckString(ip, fraction) millis = botDelayTime(host, port, botCheckString) debug(1, "Bottleneck delay: %d msecs" % millis) botDelayMsecs = millis if millis>botDelayBlock: # retry-after time factor 10 is based on the example in the bottleneck help message + sys.stderr.write("hgLib.py hogExit\n") errAbort("Too many HTTP requests and not enough delay between them. " "Your IP has been blocked to keep this website responsive for other users. " "Please contact genome-www@soe.ucsc.edu to unblock your IP address. We can also help you obtain the data you need without " "web crawling. ", status=429, headers = {"Retry-after" : str(millis / 10)}) - sys.stderr.write("hgLib.py hogExit\n") - sys.exit(0) if millis>botDelayWarn: time.sleep(millis/1000.0) doWarnBot = True # = show warning message later in printContentType() def parseRa(text): " Parse ra-style string and return as dict name -> value " import string lines = text.split("\n") data = dict() for l in lines: if len(l)==0: continue key, val = l.split(" ", maxsplit=1) data[key] = val