<p>I've made a simple patch for this. It works for my particular application, but I don't know if that is OK with everything else.</p>

<p>diff --git a/offlineimap/init.py b/offlineimap/init.py<br>
index a48c152..e141d32 100644<br>
--- a/offlineimap/init.py<br>
+++ b/offlineimap/init.py<br>
@@ -48,7 +48,8 @@ class OfflineImap:<br>
         if options.diagnostics:<br>
             self.__serverdiagnostics(options)<br>
         else:</p>

<ul>
<li>           self.__sync(options)</li>
<li>           ret = self.__sync(options)</li>
<li>
<pre><code>       return ret;
</code></pre>

<p>def <strong>parse_cmd_options(self):<br>
     parser = OptionParser(version=offlineimap.__bigversion</strong>,<br>
@@ -339,11 +340,13 @@ class OfflineImap:<br>
             offlineimap.mbnames.write(True)</p>

<pre><code>     self.ui.terminate()
</code></pre>
</li>
<li>           return 0;
     except (SystemExit):
         raise
     except Exception as e:
         self.ui.error(e)
         self.ui.terminate()</li>
<li>
<pre><code>       return 1;
</code></pre>

<p>def __sync_singlethreaded(self, accs):<br>
     """Executed if we do not want a separate syncmaster thread</p>
</li>
</ul>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br>Reply to this email directly or <a href="https://github.com/OfflineIMAP/offlineimap/issues/248#issuecomment-143479925">view it on GitHub</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AKFSEMWIyV0Wxj25YxWr3Jg19zVFTPRNks5o1uQTgaJpZM4GEKuG.gif" width="1" /></p>
<div itemscope itemtype="http://schema.org/EmailMessage">
<div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
  <link itemprop="url" href="https://github.com/OfflineIMAP/offlineimap/issues/248#issuecomment-143479925"></link>
  <meta itemprop="name" content="View Issue"></meta>
</div>
<meta itemprop="description" content="View this Issue on GitHub"></meta>
</div>