Skip to content

Commit 2e72bb7

Browse files
committed
bin: Rename --user to --username
optparse will still match the option name if --user is passed, and this way the option has a more expected name.
1 parent fd0c66a commit 2e72bb7

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ Before running rw-functional tests, make sure you have logged into bugzilla
3737
using. These currently run against the test bugzilla instance at
3838
partner-bugzilla.redhat.com, and requires a valid login there:
3939

40-
bugzilla-cli --bugzilla=partner-bugzilla.redhat.com --user=$USER login
40+
bugzilla-cli --bugzilla=partner-bugzilla.redhat.com --username=$USER login
4141
python setup.py test --rw-functional
4242

4343
## Testing across python versions

bin/bugzilla

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ def setup_parser():
107107
action="store_false", default=True,
108108
help="Don't error on invalid bugzilla SSL certificate")
109109

110-
p.add_option('--user', help="Optional bugzilla login username")
110+
p.add_option('--username', help="Optional bugzilla login username")
111111
p.add_option('--password', help="Optional bugzilla login password")
112112
p.add_option('--login', action="store_true",
113113
help='Run interactive "login" before performing the '
@@ -1220,16 +1220,16 @@ def main(bzinstance=None):
12201220
if force_login:
12211221
if is_login_command:
12221222
if len(args) == 2:
1223-
(global_opt.user, global_opt.password) = args
1223+
(global_opt.username, global_opt.password) = args
12241224
elif len(args) == 1:
1225-
(global_opt.user, ) = args
1225+
(global_opt.username, ) = args
12261226
elif len(args) > 2:
12271227
parser.error("Too many arguments for login")
12281228

12291229
try:
12301230
if force_login:
12311231
bz.interactive_login(
1232-
global_opt.user, global_opt.password, force_login)
1232+
global_opt.username, global_opt.password, force_login)
12331233
if is_login_command:
12341234
print("Login successful.")
12351235
sys.exit(0)

0 commit comments

Comments
 (0)