From: Zooko O'Whielacronx Date: Wed, 22 Aug 2007 17:32:00 +0000 (-0700) Subject: change name of the query "allow_local_access()?" to "local_access_is_allowed()" X-Git-Url: https://git.rkrishnan.org/frontends/$top_link?a=commitdiff_plain;h=427bf2cdc956af6b930144acc1bfbc837d04bd70;p=tahoe-lafs%2Ftahoe-lafs.git change name of the query "allow_local_access()?" to "local_access_is_allowed()" So as to avoid confusing it with the setter method "allow_local_access(allowed=True)". --- diff --git a/src/allmydata/webish.py b/src/allmydata/webish.py index 7f030e81..703f9a10 100644 --- a/src/allmydata/webish.py +++ b/src/allmydata/webish.py @@ -21,7 +21,7 @@ def getxmlfile(name): class IClient(Interface): pass class ILocalAccess(Interface): - def allow_local_access(): + def local_access_is_allowed(): pass @@ -920,7 +920,7 @@ class VDrive(rend.Page): if localdir != os.path.abspath(localdir): return NeedAbsolutePathError(), () if localfile or localdir: - if not ILocalAccess(ctx).allow_local_access(): + if not ILocalAccess(ctx).local_access_is_allowed(): return LocalAccessDisabledError(), () if req.getHost().host != LOCALHOST: return NeedLocalhostError(), () @@ -1132,7 +1132,7 @@ class LocalAccess: implements(ILocalAccess) def __init__(self): self.local_access = False - def allow_local_access(self): + def local_access_is_allowed(self): return self.local_access class WebishServer(service.MultiService):