- [SCRIPTS] MediaWiki 1.9.3 and 1.6.7
+- util.fetch() should use urllib under the hood, not httplib. Code
+ has to be changed. We should log if we get redirected.
+- Wordpress module can do something intelligent if we get redirected
+ to the installation page.
+
- Plugin-ify! Hook-ify! In more detail, applications should all be moved
out into plugins, scripts specific behavior should be moved into
plugins, and hooks need to be made available so that we can exert
def user_quota(dir=None):
"""
Returns a tuple (quota usage, quota limit). Works only for scripts
- servers. Values are in KiB. Returns ``(0, None)`` if we couldn't figure it out.
+ servers. Values are in bytes. Returns ``(0, None)`` if we couldn't figure it out.
"""
end = 2
# sometimes the volume is busy; so we try several times
return unknown
except shell.CallError:
return unknown
+ logging.debug("vos examine output was:\n\n" + "\n".join(result))
try:
- usage = int(result[0].split()[3])
- limit = int(result[3].split()[1]) # XXX: FRAGILE
+ usage = int(result[0].split()[3]) * 1024
+ limit = int(result[3].split()[1]) * 1024 # XXX: FRAGILE
except ValueError:
raise QuotaParseError("vos examine output was:\n\n" + "\n".join(result))
return (usage, limit)
def preflightQuota(self):
usage, limit = user.quota()
if limit is not None and (limit - usage) < buffer:
+ logging.info("preflightQuota: limit = %d, usage = %d, buffer = %d", limit, usage, buffer)
raise QuotaTooLow
def merge(self):
if url:
if isinstance(url, str):
url = urlparse.urlparse(url)
- logging.info("wizard.deploy.web: Using URL %s", url)
+ logging.info("wizard.deploy.web: Using default URL %s", url)
yield url
return
for r in f(dir):
if isinstance(r, str):
r = urlparse.urlparse(r)
- logging.info("wizard.deploy.web: Using URL %s", r)
+ logging.info("wizard.deploy.web: Using plugin-supplied URL %s", r)
yield r
# try the environment
host,
path.rstrip('/'),
"", "", "")
- logging.info("wizard.deploy.web: Using URL %s", r)
+ logging.info("wizard.deploy.web: Using environment URL %s", r)
yield r
logging.info("wizard.deploy.web: Exhausted URLs")