comparison hgext/notify.py @ 4094:fbf0e9acfd83

notify: don't try to fix addresses if notify.domain is not set
author Alexis S. L. Carvalho <alexis@cecm.usp.br>
date Fri, 16 Feb 2007 04:54:49 -0200
parents 1305ba7dee88
children 49237d6ae97d afa1f57ae484
comparison
equal deleted inserted replaced
4093:669f99f78db0 4094:fbf0e9acfd83
135 135
136 def fixmail(self, addr): 136 def fixmail(self, addr):
137 '''try to clean up email addresses.''' 137 '''try to clean up email addresses.'''
138 138
139 addr = templater.email(addr.strip()) 139 addr = templater.email(addr.strip())
140 a = addr.find('@localhost') 140 if self.domain:
141 if a != -1: 141 a = addr.find('@localhost')
142 addr = addr[:a] 142 if a != -1:
143 if '@' not in addr: 143 addr = addr[:a]
144 return addr + '@' + self.domain 144 if '@' not in addr:
145 return addr + '@' + self.domain
145 return addr 146 return addr
146 147
147 def subscribers(self): 148 def subscribers(self):
148 '''return list of email addresses of subscribers to this repo.''' 149 '''return list of email addresses of subscribers to this repo.'''
149 150