hgext/notify.py
changeset 4094 fbf0e9acfd83
parent 4077 1305ba7dee88
child 4096 49237d6ae97d
child 4479 afa1f57ae484
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