mirror of
https://github.com/zulip/zulip.git
synced 2025-11-12 18:06:44 +00:00
zephyr_mirror: Avoid printing Hesiod errors to stderr.
(imported from commit 2f0016b196d764027e4e53a937167d04b3e96f49)
This commit is contained in:
@@ -89,7 +89,8 @@ def fetch_fullname(username):
|
|||||||
match_user = re.match(r'([a-zA-Z0-9_]+)@mit\.edu', username)
|
match_user = re.match(r'([a-zA-Z0-9_]+)@mit\.edu', username)
|
||||||
if match_user:
|
if match_user:
|
||||||
proc = subprocess.Popen(['hesinfo', match_user.group(1), 'passwd'],
|
proc = subprocess.Popen(['hesinfo', match_user.group(1), 'passwd'],
|
||||||
stdout=subprocess.PIPE)
|
stdout=subprocess.PIPE,
|
||||||
|
stderr=subprocess.PIPE)
|
||||||
out, _err_unused = proc.communicate()
|
out, _err_unused = proc.communicate()
|
||||||
if proc.returncode == 0:
|
if proc.returncode == 0:
|
||||||
return out.split(':')[4].split(',')[0]
|
return out.split(':')[4].split(',')[0]
|
||||||
|
|||||||
Reference in New Issue
Block a user