Browse Source

PEP8, coding_rules and comments

Guénaël Muller 7 years ago
parent
commit
8a0317923d
1 changed files with 11 additions and 3 deletions
  1. 11 3
      tracim/tracim/lib/daemons.py

+ 11 - 3
tracim/tracim/lib/daemons.py View File

@@ -151,10 +151,15 @@ class Daemon(threading.Thread):
151 151
         """
152 152
         raise NotImplementedError()
153 153
 
154
+
154 155
 class MailFetcherDaemon(Daemon):
156
+    """
157
+    Thread containing a daemon who fetch new mail from a mailbox and
158
+    send http request to a tracim endpoint to handle them.
159
+    """
160
+
155 161
     def __init__(self, *args, **kwargs):
156 162
         super().__init__(*args, **kwargs)
157
-        #self._prepare_config()
158 163
         self._fetcher = None
159 164
         self.ok = True
160 165
 
@@ -168,7 +173,8 @@ class MailFetcherDaemon(Daemon):
168 173
             password=cfg.EMAIL_REPLY_IMAP_PASSWORD,
169 174
             folder=cfg.EMAIL_REPLY_IMAP_FOLDER,
170 175
             delay=cfg.EMAIL_REPLY_DELAY,
171
-            endpoint=cfg.WEBSITE_BASE_URL + "/events"
176
+            # FIXME - G.M - 2017-11-15 - proper tracim url formatting
177
+            endpoint=cfg.WEBSITE_BASE_URL + "/events",
172 178
         )
173 179
         self._fetcher.run()
174 180
 
@@ -176,7 +182,9 @@ class MailFetcherDaemon(Daemon):
176 182
         if self._fetcher:
177 183
             self._fetcher.stop()
178 184
 
179
-
185
+    def append_thread_callback(self, callback: collections.Callable) -> None:
186
+        logger.warning('MailFetcherDaemon not implement append_thread_calback')
187
+        pass
180 188
 
181 189
 
182 190
 class MailSenderDaemon(Daemon):