hgext/notify.py
changeset 4096 49237d6ae97d
parent 4081 e6d26e71f049
parent 4094 fbf0e9acfd83
child 4495 fc20fa9f2dfd
equal deleted inserted replaced
4085:719488a98ebe 4096:49237d6ae97d
   134 
   134 
   135     def fixmail(self, addr):
   135     def fixmail(self, addr):
   136         '''try to clean up email addresses.'''
   136         '''try to clean up email addresses.'''
   137 
   137 
   138         addr = templater.email(addr.strip())
   138         addr = templater.email(addr.strip())
   139         a = addr.find('@localhost')
   139         if self.domain:
   140         if a != -1:
   140             a = addr.find('@localhost')
   141             addr = addr[:a]
   141             if a != -1:
   142         if '@' not in addr:
   142                 addr = addr[:a]
   143             return addr + '@' + self.domain
   143             if '@' not in addr:
       
   144                 return addr + '@' + self.domain
   144         return addr
   145         return addr
   145 
   146 
   146     def subscribers(self):
   147     def subscribers(self):
   147         '''return list of email addresses of subscribers to this repo.'''
   148         '''return list of email addresses of subscribers to this repo.'''
   148 
   149