[offlineimap] Return value of offlineimap (#248)

Prashant Sachdeva notifications at github.com
Sat Sep 26 20:05:55 BST 2015


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.

diff --git a/offlineimap/init.py b/offlineimap/init.py
index a48c152..e141d32 100644
--- a/offlineimap/init.py
+++ b/offlineimap/init.py
@@ -48,7 +48,8 @@ class OfflineImap:
         if options.diagnostics:
             self.__serverdiagnostics(options)
         else:
-            self.__sync(options)
+            ret = self.__sync(options)
+            return ret;
 
     def __parse_cmd_options(self):
         parser = OptionParser(version=offlineimap.__bigversion__,
@@ -339,11 +340,13 @@ class OfflineImap:
                 offlineimap.mbnames.write(True)
 
             self.ui.terminate()
+            return 0;
         except (SystemExit):
             raise
         except Exception as e:
             self.ui.error(e)
             self.ui.terminate()
+            return 1;
 
     def __sync_singlethreaded(self, accs):
         """Executed if we do not want a separate syncmaster thread


---
Reply to this email directly or view it on GitHub:
https://github.com/OfflineIMAP/offlineimap/issues/248#issuecomment-143479925
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/offlineimap-project/attachments/20150926/794987e4/attachment-0003.html>


More information about the OfflineIMAP-project mailing list