OfflineIMAP/offlineimap

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

Open

#517 建立於 2018年1月15日

在 GitHub 查看
 (2 留言) (2 反應) (0 負責人)Python (1,765 star) (373 fork)batch import
enhancementgood first issueneed contributor!

描述

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)

貢獻者指南

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