diff options
author | Caio Carrara <ccarrara@thoughtworks.com> | 2016-05-11 16:24:46 -0300 |
---|---|---|
committer | Caio Carrara <ccarrara@thoughtworks.com> | 2016-05-11 16:24:46 -0300 |
commit | c5f92efdd19464b876e56750f85a6d8ba4d7b558 (patch) | |
tree | 27153897785261460f7bd9fa3a7c588eb1d5137a /service/pixelated/config/credentials.py | |
parent | a23d3bebc0c879682f7d70b2a8451cc98b2d70ab (diff) |
Remove dispatcher references from service
Since we're not using dispatcher anymore, it doesn't make sense to keep
dispatcher references and program flows that depend on it. For example,
it doesn't make sense keep the flag --organization-mode, so it was
removed as well.
Diffstat (limited to 'service/pixelated/config/credentials.py')
-rw-r--r-- | service/pixelated/config/credentials.py | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/service/pixelated/config/credentials.py b/service/pixelated/config/credentials.py index a6da86e6..89901b3f 100644 --- a/service/pixelated/config/credentials.py +++ b/service/pixelated/config/credentials.py @@ -21,13 +21,10 @@ import sys import ConfigParser -def read(organization_mode, credentials_file): - if organization_mode: - return read_from_dispatcher() - else: - if credentials_file: - return read_from_file(credentials_file) - return prompt_for_credentials() +def read(credentials_file): + if credentials_file: + return read_from_file(credentials_file) + return prompt_for_credentials() def prompt_for_credentials(): @@ -46,8 +43,3 @@ def read_from_file(credentials_file): config_parser.get('pixelated', 'leap_username'), \ config_parser.get('pixelated', 'leap_password') return provider, user, password - - -def read_from_dispatcher(): - config = json.loads(sys.stdin.read()) - return config['leap_provider_hostname'], config['user'], config['password'] |