-
Notifications
You must be signed in to change notification settings - Fork 151
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Only ask for sudo password when required (#484)
* Only ask for sudo password when required Check nmcli permissions and only ask for password if required. Move getpass to separate func and validate password input using assert Otherwise raise AssertionError Change sudo func to return an empty string if no sudo password is provided in order to prevent formating of the nmcli commands with sudo prefix if not required. Raise condition is moved at password input. * Allow password arg from None type in driver class As password isn't a mandatory requirement for the follwing classes also accept None type arg for password. - Nmcli0990Wireless - NmcliWireless - WpasupplicantWireless Replace assert with if not raise RunTime error.
- Loading branch information
Showing
2 changed files
with
36 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters