Bring us up to commit 0b8875225750 ("Allow multiple spaces within an
email address") of the upstream gitdm project.
    
Signed-off-by: Tom Rini <tr...@konsulko.com>

--- 
So this isn't a real patch exactly.  This shows what the single merge
error would need to be corrected as, in order to bring our tree up to
the above commit from upstream.  That in turn is just doing a python3
print() rather than python2 print in the error case where we try and
further correct the Funky email addresses we have, in code that was
already clearly marked as local only code.  The rest of those changes
moved in cleanly.

diff --cc database.py
index f356f298c7ed,b50b70cac378..6c43dd23f55e
--- a/database.py
+++ b/database.py
@@@ -296,56 -315,20 +315,56 @@@ def AddEmailEmployerMapping(email, empl
      except KeyError:
          EmailToEmployer[email] = [(end, empl)]
  
 +##!!wd!!
 +FunkyToEmail = {
 +    #
 +    # Known corrupted addresses.
 +    #
 +    'bnemec <at': 'bne...@ganssloser.com',
 +    'ch.naveen.samsung.com': 'ch.nav...@samsung.com',
 +    'graeme.russ at gmail.com': 'graeme.r...@gmail.com',
 +    'h.rohit at samsung.com': 'h.ro...@samsung.com',
 +    'hskinnemoen <at': 'hskinnem...@atmel.com',
 +    'kazuichi at fsi.co.jp': 'kazui...@fsi.co.jp',
 +    'notasas at': 'nota...@gmail.com',
 +    'phdm at macqel.be': 'p...@macqel.be',
 +    'plagnioj <at': 'plagn...@jcrosoft.com',
 +    'plagnioj <at> jcrosoft.com': 'plagn...@jcrosoft.com',
 +    'plagnioj at': 'plagn...@jcrosoft.com',
 +    'richardretanubun at ruggedcom.com': 'richardretanu...@ruggedcom.com',
 +    'scn1874 at yandex.ru': 'scn1...@yandex.ru',
 +    'stelian <at': 'stel...@popies.net',
 +    'steve.sakomanlinaro.org': 'steve.sako...@linaro.org',
 +    'tomasz.figa_at_gmail.com': 'tomasz.f...@gmail.com',
 +    'w.wegner at astro-kom.de': 'w.weg...@astro-kom.de',
 +    'v-stehle <at': 'v-ste...@ti.com',
 +    'kotnes <at': 'kot...@cisco.com',
 +};
 +#    'kotnes <at> cisco <dot> com': 'kot...@cisco.com',
 +##!!wd!!
 +
- def MapToEmployer (email, unknown = 0):
+ def MapToEmployer(email, unknown = 0):
      # Somebody sometimes does s/@/ at /; let's fix it.
-     email = email.lower ().replace (' at ', '@')
+     email = email.lower().replace(' at ', '@')
      try:
          return EmailToEmployer[email]
      except KeyError:
          pass
-     namedom = email.split ('@')
-     if len (namedom) < 2:
-         print 'Oops...funky email %s' % email
+     namedom = email.split('@')
+     if len(namedom) < 2:
+         print('Oops...funky email %s' % email)
 +        ##!!wd!!
 +        try:
 +            email = FunkyToEmail[email]
-             print ' ... fixed up to %s' % email
++            print(' ... fixed up to %s' % email)
 +            namedom = email.split ('@')
 +        except KeyError:
 +            return [(nextyear, GetEmployer ('Funky'))]
 +        ##!!wd!!
-         return [(nextyear, GetEmployer ('Funky'))]
-     s = namedom[1].split ('.')
-     for dots in range (len (s) - 2, -1, -1):
-         addr = '.'.join (s[dots:])
+         return [(nextyear, GetEmployer('Funky'))]
+     s = namedom[1].split('.')
+     for dots in range(len(s) - 2, -1, -1):
+         addr = '.'.join(s[dots:])
          try:
              return EmailToEmployer[addr]
          except KeyError:

Reply via email to