You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@uima.apache.org by bu...@apache.org on 2015/12/16 21:09:36 UTC

svn commit: r1720431 - /uima/sandbox/uima-ducc/trunk/src/main/admin/ducc_util.py

Author: burn
Date: Wed Dec 16 20:09:36 2015
New Revision: 1720431

URL: http://svn.apache.org/viewvc?rev=1720431&view=rev
Log:
UIMA-4711 Fail quickly if current directory has been replaced

Modified:
    uima/sandbox/uima-ducc/trunk/src/main/admin/ducc_util.py

Modified: uima/sandbox/uima-ducc/trunk/src/main/admin/ducc_util.py
URL: http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/src/main/admin/ducc_util.py?rev=1720431&r1=1720430&r2=1720431&view=diff
==============================================================================
--- uima/sandbox/uima-ducc/trunk/src/main/admin/ducc_util.py (original)
+++ uima/sandbox/uima-ducc/trunk/src/main/admin/ducc_util.py Wed Dec 16 20:09:36 2015
@@ -37,8 +37,14 @@ import Queue
 from  stat import *
 from local_hooks import find_other_processes
 
+# Catch the annoying problem when the current directory has been changed, e.g. by installing a new release
+try:
+    os.getcwd()
+except:
+    print "ERROR getting current directory ... may have been replaced .. tryin cd'ing to it again"
+    sys.exit(1)
 
-# simple bootstratp to establish DUCC_HOME and to set the python path so it can
+# simple bootstrap to establish DUCC_HOME and to set the python path so it can
 # find the common code in DUCC_HOME/admin
 # Infer DUCC_HOME from our location - no longer use a (possibly inaccurate) environment variable
 me = os.path.abspath(__file__)