summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Maia and Victor Shyba <pixelated-team+pmaia+vshyba@thoughtworks.com>2014-08-22 17:28:43 +0000
committerPatrick Maia <pmaia@thoughtworks.com>2014-08-22 18:23:43 +0000
commitf446678cff401cd8a5ef3396ec66c4522c2a0dd9 (patch)
treec995f60b67829335f17626d71c9a68f0a8ce0f12
parentbced8bdb030be444245da61df1cf2edc6625d544 (diff)
fixes style issues
-rw-r--r--service/pixelated/adapter/mail_service.py3
-rw-r--r--service/pixelated/reactor_manager.py6
-rw-r--r--service/pixelated/user_agent.py2
3 files changed, 6 insertions, 5 deletions
diff --git a/service/pixelated/adapter/mail_service.py b/service/pixelated/adapter/mail_service.py
index 782d2dfe..b9c12e65 100644
--- a/service/pixelated/adapter/mail_service.py
+++ b/service/pixelated/adapter/mail_service.py
@@ -30,12 +30,11 @@ class MailService:
self.provider = LeapProvider(self.server_name, self.leap_config)
self.leap_session = LeapSessionFactory(self.provider).create(LeapCredentials(self.username, self.password))
self.account = self.leap_session.account
-
+
@property
def mailbox(self):
return self.account.getMailbox(self.mailbox_name)
-
def mails(self, query):
mails = self.mailbox.messages or []
mails = [PixelatedMail(mail) for mail in mails]
diff --git a/service/pixelated/reactor_manager.py b/service/pixelated/reactor_manager.py
index 6b9b3f86..0def43e4 100644
--- a/service/pixelated/reactor_manager.py
+++ b/service/pixelated/reactor_manager.py
@@ -4,6 +4,7 @@ from threading import Thread
from twisted.internet import reactor
import logging
+
def signal_handler(signal, frame):
stop_reactor_on_exit()
sys.exit(0)
@@ -12,7 +13,7 @@ def signal_handler(signal, frame):
def start_reactor(logging=False):
if logging:
enable_logging()
-
+
def start_reactor_run():
reactor.run(False)
@@ -28,13 +29,14 @@ def stop_reactor_on_exit():
signal.signal(signal.SIGINT, signal_handler)
+
def enable_logging():
logging.basicConfig(level=logging.DEBUG,
format='%(asctime)s %(name)-12s %(levelname)-8s %(message)s',
datefmt='%m-%d %H:%M',
filename='/tmp/leap.log',
filemode='w')
-
+
# define a Handler which writes INFO messages or higher to the sys.stderr
console = logging.StreamHandler()
console.setLevel(logging.DEBUG)
diff --git a/service/pixelated/user_agent.py b/service/pixelated/user_agent.py
index 9a87863f..f2f62134 100644
--- a/service/pixelated/user_agent.py
+++ b/service/pixelated/user_agent.py
@@ -136,7 +136,7 @@ def setup():
reactor_manager.start_reactor(logging=debug_enabled)
app.config.from_pyfile('config/pixelated_ua.cfg')
account = app.config['ACCOUNT']
- app.config['DEBUG'] = debug_enabled
+ app.config['DEBUG'] = debug_enabled
app.run(host=app.config['HOST'], debug=debug_enabled, port=app.config['PORT'])