Package: reportbug
Version: 6.6.3
Severity: minor
Tags: patch

Dear Maintainer,

The fix for https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=224231
was not fully accurate. "finger" does capitalize, not uppercase the
username replacing the ampersand.

Patch attached.
>From a385efe73ab398b9acd51319dd5249385843326d Mon Sep 17 00:00:00 2001
From: Nis Martensen <nis.marten...@web.de>
Date: Thu, 29 Dec 2016 19:25:44 +0100
Subject: [PATCH] Ampersand replacement should capitalize, but not uppercase

to match behavior of "finger"
---
 reportbug/utils.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/reportbug/utils.py b/reportbug/utils.py
index 89e0991..4b00a86 100644
--- a/reportbug/utils.py
+++ b/reportbug/utils.py
@@ -305,7 +305,7 @@ def get_user_id(email='', realname='', charset='utf-8'):
         if not realname:
             realname = info[4].split(',', 1)[0]
             # Convert & in gecos field 4 to capitalized logname: #224231
-            realname = realname.replace('&', info[0].upper())
+            realname = realname.replace('&', info[0].capitalize())
 
     if not realname:
         return email
-- 
2.1.4

Reply via email to