diff options
author | Duda Dornelles <ddornell@thoughtworks.com> | 2014-08-28 17:08:15 -0300 |
---|---|---|
committer | Duda Dornelles <ddornell@thoughtworks.com> | 2014-08-28 17:08:15 -0300 |
commit | 8d720d413122ddcba43cc52ceaa13513ac23ac37 (patch) | |
tree | 1684645dd215d4421c44ad2bd9b749c43b82461f /service/pixelated | |
parent | 42009ce9006a1c67df2dcebc6ff2002b36655682 (diff) |
fixing pep8
Diffstat (limited to 'service/pixelated')
-rw-r--r-- | service/pixelated/adapter/mail_service.py | 2 | ||||
-rw-r--r-- | service/pixelated/user_agent.py | 4 |
2 files changed, 5 insertions, 1 deletions
diff --git a/service/pixelated/adapter/mail_service.py b/service/pixelated/adapter/mail_service.py index 416c7bfc..48495d51 100644 --- a/service/pixelated/adapter/mail_service.py +++ b/service/pixelated/adapter/mail_service.py @@ -51,7 +51,7 @@ class MailService: def start(self): try: - self.smtp_server = self._create_smtp_server() + self.smtp_server = self._create_smtp_server() self.smtp_client = self._create_smtp_client(self.smtp_server.smtp_info()) except: traceback.print_exc(file=sys.stdout) diff --git a/service/pixelated/user_agent.py b/service/pixelated/user_agent.py index 4b234fe8..3e9eadaf 100644 --- a/service/pixelated/user_agent.py +++ b/service/pixelated/user_agent.py @@ -36,6 +36,7 @@ app.config.from_pyfile(os.path.join(os.environ['HOME'], '.pixelated')) leap_session = open_leap_session(app.config['LEAP_USERNAME'], app.config['LEAP_PASSWORD'], app.config['LEAP_SERVER_NAME']) mail_service = MailService(leap_session) + def respond_json(entity): response = json.dumps(entity) return Response(response=response, mimetype="application/json") @@ -58,6 +59,7 @@ def send_mail(): mail_service.send(mail) return respond_json(None) + @app.route('/mails', methods=['PUT']) def update_draft(): raw_mail = json.parse(request.json) @@ -127,10 +129,12 @@ def mark_mail_as_read(mail_id): def contacts(): pass + @app.route('/draft_reply_for/<mail_id>') def draft_reply_for(mail_id): pass + @app.route('/') def index(): return app.send_static_file('index.html') |