From cc03d582035a0a601269d1c35e03bebf8147b871 Mon Sep 17 00:00:00 2001 From: Jessica McKellar Date: Wed, 12 Mar 2014 13:34:28 -0400 Subject: [PATCH] integrations: make Codebase dependency on python-dateutil explicit. requests is already required generally by the API bindings. (imported from commit 216c7031def710aac415cca755dbe2454514decb) --- integrations/codebase/zulip_codebase_mirror | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/integrations/codebase/zulip_codebase_mirror b/integrations/codebase/zulip_codebase_mirror index 9fe875e..92bb060 100755 --- a/integrations/codebase/zulip_codebase_mirror +++ b/integrations/codebase/zulip_codebase_mirror @@ -22,12 +22,12 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. # -# The "codebase-mirror.py" script is run continuously, possibly on a work computer -# or preferably on a server. +# The "zulip_codebase_mirror" script is run continuously, possibly on a work +# computer or preferably on a server. # # When restarted, it will attempt to pick up where it left off. # -# You may need to install the python-requests library, as well as python-dateutil +# python-dateutil is a dependency for this script. import requests import logging @@ -37,7 +37,13 @@ import os from datetime import datetime, timedelta -import dateutil.parser + +try: + import dateutil.parser +except ImportError, e: + print >>sys.stderr, e + print >>sys.stderr, "Please install the python-dateutil package." + exit(1) sys.path.insert(0, os.path.dirname(__file__)) import zulip_codebase_config as config