From c5f92efdd19464b876e56750f85a6d8ba4d7b558 Mon Sep 17 00:00:00 2001 From: Caio Carrara Date: Wed, 11 May 2016 16:24:46 -0300 Subject: 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. --- service/pixelated/config/credentials.py | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) (limited to 'service/pixelated/config/credentials.py') 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'] -- cgit v1.2.3