Modify ↓
Opened 15 years ago
Closed 15 years ago
#402 closed enhancement (fixed)
[PATCH] Add an option to prompt for a password
Reported by: | mike@… | Owned by: | osimons |
---|---|---|---|
Priority: | minor | Milestone: | 0.6 |
Component: | Build slave | Version: | dev |
Keywords: | Cc: | ||
Operating System: | Linux |
Description
This patch makes it so the bitten slave prompts for the password, rather than taking it on the command line (and putting it in ps).
This is useful when you don't want to put your password into a config file.
Attachments (1)
Change History (4)
Changed 15 years ago by mike@…
comment:1 Changed 15 years ago by osimons
- Owner changed from cmlenz to osimons
- Summary changed from Add an option to prompt for a password to [PATCH] Add an option to prompt for a password
I'll look at it.
comment:2 Changed 15 years ago by osimons
Same result, but I've modified it slightly to be more rational and contained:
-
bitten/slave.py
a b 358 358 help='the username to use for authentication') 359 359 parser.add_option('-p', '--password', dest='password', 360 360 help='the password to use when authenticating') 361 def _ask_password(option, opt_str, value, parser): 362 from getpass import getpass 363 parser.values.password = getpass('Passsword: ') 364 parser.add_option('-P', '--ask-password', action='callback', 365 callback=_ask_password, help='Prompt for password') 361 366 362 367 group = parser.add_option_group('building') 363 368 group.add_option('-d', '--work-dir', action='store', dest='work_dir',
Any comments before I commit?
comment:3 Changed 15 years ago by osimons
- Resolution set to fixed
- Status changed from new to closed
Committed in [661]. Thanks!
Note: See
TracTickets for help on using
tickets.
Patch