aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorW. Trevor King <wking@drexel.edu>2009-09-26 12:43:40 -0400
committerW. Trevor King <wking@drexel.edu>2009-09-26 12:43:40 -0400
commit9bd1ddd35544a3772e490494459d788ed5da62a3 (patch)
tree5f54c95a8f06a5f15f881e024bbf972a9c993ee5
parent7ec39c25f302c4b1056885c26508e20200494df6 (diff)
downloadbugseverywhere-9bd1ddd35544a3772e490494459d788ed5da62a3.tar.gz
Prefix cache attributes in be-handle-mail with underscore (_).
To conform with Python convention for "hiding" class attributes only intended for internal use.
-rwxr-xr-xinterfaces/email/interactive/be-handle-mail10
1 files changed, 5 insertions, 5 deletions
diff --git a/interfaces/email/interactive/be-handle-mail b/interfaces/email/interactive/be-handle-mail
index bcb9519..bb2cc28 100755
--- a/interfaces/email/interactive/be-handle-mail
+++ b/interfaces/email/interactive/be-handle-mail
@@ -165,7 +165,7 @@ class ID (object):
self.command = command
def extract_id(self):
if hasattr(self, "cached_id"):
- return self.cached_id
+ return self._cached_id
assert self.command.ret == 0, self.command.ret
if self.command.command == u"new":
regexp = re.compile(u"Created bug with ID (.*)")
@@ -173,8 +173,8 @@ class ID (object):
raise NotImplementedError, self.command.command
match = regexp.match(self.command.stdout)
assert len(match.groups()) == 1, str(match.groups())
- self.cached_id = match.group(1)
- return self.cached_id
+ self._cached_id = match.group(1)
+ return self._cached_id
def __str__(self):
if self.command.ret != 0:
return "<id for %s>" % repr(self.command)
@@ -359,9 +359,9 @@ class Message (object):
(name, email) tuple.
"""
if not hasattr(self, "author_tuple_cache"):
- self.author_tuple_cache = \
+ self._author_tuple_cache = \
send_pgp_mime.source_email(self.msg, return_realname=True)
- return self.author_tuple_cache
+ return self._author_tuple_cache
def author_addr(self):
return email.utils.formataddr(self.author_tuple())
def author_name(self):