diff options
author | Duda Dornelles <ddornell@thoughtworks.com> | 2014-11-20 15:03:02 -0200 |
---|---|---|
committer | Duda Dornelles <ddornell@thoughtworks.com> | 2014-11-20 15:03:40 -0200 |
commit | feab7da9b4dad9ae0aa86ab3f6c06f9f943e9c0c (patch) | |
tree | 6fd84e675866444ca19fe6b46221317e2a0bd8d4 /service/pixelated | |
parent | 31b42f83413e1edaf019c6e13d0053646ac44596 (diff) |
place and fixing pep
Diffstat (limited to 'service/pixelated')
-rw-r--r-- | service/pixelated/bitmask_libraries/nicknym.py | 1 | ||||
-rw-r--r-- | service/pixelated/bitmask_libraries/register.py | 2 | ||||
-rw-r--r-- | service/pixelated/config/app_factory.py | 7 |
3 files changed, 6 insertions, 4 deletions
diff --git a/service/pixelated/bitmask_libraries/nicknym.py b/service/pixelated/bitmask_libraries/nicknym.py index 4b737a8f..362167b6 100644 --- a/service/pixelated/bitmask_libraries/nicknym.py +++ b/service/pixelated/bitmask_libraries/nicknym.py @@ -29,6 +29,7 @@ class NickNym(object): def generate_openpgp_key(self): if not self._key_exists(self._email): + print "Generating keys - this could take a while..." self._gen_key() self._send_key_to_leap() diff --git a/service/pixelated/bitmask_libraries/register.py b/service/pixelated/bitmask_libraries/register.py index 11a7057f..0ebe9c11 100644 --- a/service/pixelated/bitmask_libraries/register.py +++ b/service/pixelated/bitmask_libraries/register.py @@ -31,5 +31,5 @@ def register_new_user(username, server_name): password = getpass.getpass('Please enter password for %s: ' % username) LeapAuthenticator(provider).register(LeapCredentials(username, password)) session = LeapSession.open(username, password, server_name) - print "Generating keys - this could take a while..." + session.nicknym.generate_openpgp_key() diff --git a/service/pixelated/config/app_factory.py b/service/pixelated/config/app_factory.py index 652ef5b1..497ab205 100644 --- a/service/pixelated/config/app_factory.py +++ b/service/pixelated/config/app_factory.py @@ -37,7 +37,8 @@ from leap.common.events import ( ) from twisted.web.server import Site -CREATE_KEYS_IF_KEYS_DONT_EXISTS_CALLBACK=12345 +CREATE_KEYS_IF_KEYS_DONT_EXISTS_CALLBACK = 12345 + def init_index_and_remove_dupes(querier, search_engine, mail_service): def wrapper(*args, **kwargs): @@ -56,7 +57,8 @@ def update_info_sync_and_index_partial(sync_info_controller, search_engine, mail return wrapper -def _setup_routes(app, home_controller, mails_controller, tags_controller, features_controller, sync_info_controller, attachments_controller): +def _setup_routes(app, home_controller, mails_controller, tags_controller, features_controller, sync_info_controller, + attachments_controller): # mails app.route('/mails', methods=['GET'])(mails_controller.mails) app.route('/mail/<mail_id>/read', methods=['POST'])(mails_controller.mark_mail_as_read) @@ -103,7 +105,6 @@ def look_for_user_key_and_create_if_cant_find(leap_session): return wrapper - def init_app(app): leap_session = init_leap_session(app) soledad_querier = SoledadQuerier(soledad=leap_session.account._soledad) |