diff options
| author | shadchin <[email protected]> | 2022-02-10 16:44:39 +0300 |
|---|---|---|
| committer | Daniil Cherednik <[email protected]> | 2022-02-10 16:44:39 +0300 |
| commit | e9656aae26e0358d5378e5b63dcac5c8dbe0e4d0 (patch) | |
| tree | 64175d5cadab313b3e7039ebaa06c5bc3295e274 /contrib/tools/python3/src/Lib/email/_parseaddr.py | |
| parent | 2598ef1d0aee359b4b6d5fdd1758916d5907d04f (diff) | |
Restoring authorship annotation for <[email protected]>. Commit 2 of 2.
Diffstat (limited to 'contrib/tools/python3/src/Lib/email/_parseaddr.py')
| -rw-r--r-- | contrib/tools/python3/src/Lib/email/_parseaddr.py | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/contrib/tools/python3/src/Lib/email/_parseaddr.py b/contrib/tools/python3/src/Lib/email/_parseaddr.py index bb53fcc2789..c5a7b23193e 100644 --- a/contrib/tools/python3/src/Lib/email/_parseaddr.py +++ b/contrib/tools/python3/src/Lib/email/_parseaddr.py @@ -67,8 +67,8 @@ def _parsedate_tz(data): if not data: return data = data.split() - if not data: # This happens for whitespace-only input. - return None + if not data: # This happens for whitespace-only input. + return None # The FWS after the comma after the day-of-week is optional, so search and # adjust for this. if data[0].endswith(',') or data[0].lower() in _daynames: @@ -128,8 +128,8 @@ def _parsedate_tz(data): tss = 0 elif len(tm) == 3: [thh, tmm, tss] = tm - else: - return None + else: + return None else: return None try: @@ -383,12 +383,12 @@ class AddrlistClass: aslist.append('@') self.pos += 1 self.gotonext() - domain = self.getdomain() - if not domain: - # Invalid domain, return an empty address instead of returning a - # local part to denote failed parsing. - return EMPTYSTRING - return EMPTYSTRING.join(aslist) + domain + domain = self.getdomain() + if not domain: + # Invalid domain, return an empty address instead of returning a + # local part to denote failed parsing. + return EMPTYSTRING + return EMPTYSTRING.join(aslist) + domain def getdomain(self): """Get the complete domain name from an address.""" @@ -403,10 +403,10 @@ class AddrlistClass: elif self.field[self.pos] == '.': self.pos += 1 sdlist.append('.') - elif self.field[self.pos] == '@': - # bpo-34155: Don't parse domains with two `@` like - # `[email protected]@important.com`. - return EMPTYSTRING + elif self.field[self.pos] == '@': + # bpo-34155: Don't parse domains with two `@` like + # `[email protected]@important.com`. + return EMPTYSTRING elif self.field[self.pos] in self.atomends: break else: |
