OfflineIMAP/offlineimap

Include exit code of pre/post sync hooks when exiting?

Open

#517 opened on Jan 15, 2018

View on GitHub
 (2 comments) (2 reactions) (0 assignees)Python (1,765 stars) (373 forks)batch import
enhancementgood first issueneed contributor!

Description

General informations

  • system/distribution (with version): Red Hat Enterprise Linux Server release 7.4 (Maipo)
  • offlineimap version (offlineimap -V): offlineimap v7.1.4, imaplib2 v2.57 (bundled), Python v2.7.5, OpenSSL 1.0.1e-fips 11 Feb 2013
  • Python version: Python 2.7.5
  • server name or domain:
  • CLI options: timeout --foreground --signal=QUIT 4m
    /path/to/offlineimap.git/offlineimap.py
    -c /path/to/offlineimaprc

Steps to reproduce the error

No error as such, but I was wondering if there was some way for offlineimap to allow the exit code of presynchook or postsynchook to be returned by offlineimap itself? For example, I use a postsynchook which I've just noticed in my syslog is misbehaving, and exiting with error 127. However, offlineimap exists with zero indicating that everything is ok. Am I able to somehow make offlineimap include the exit value of the postsynchook when generating it's exit code upon exit? Or does the exit code of the pre/postsync hooks need to be managed separately (eg send result to a file for testing after offlineimap has exited)? Thanks! Matt (happy offlineimap user for many years)

Contributor guide

Include exit code of pre/post sync hooks when exiting? · OfflineIMAP/offlineimap#517 | Good First Issue