commit 4c81926ba1f6da1642c5b5d29ce303293bfec0a8
Author: Isis Lovecruft <i...@torproject.org>
Date:   Thu May 1 00:27:24 2014 +0000

    Add weird except handler for missing os.ST_WRITE in Travis.
---
 lib/bridgedb/util.py |    9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/lib/bridgedb/util.py b/lib/bridgedb/util.py
index 00e4ce5..66b228b 100644
--- a/lib/bridgedb/util.py
+++ b/lib/bridgedb/util.py
@@ -59,7 +59,14 @@ def _getRotatingFileHandler(filename, mode='a', 
maxBytes=1000000, backupCount=0,
     if not os.path.exists(filename):
         open(filename, 'a').close()
     os.chown(filename, uid, gid)
-    os.chmod(filename, os.ST_WRITE | os.ST_APPEND)
+    try:
+        os.chmod(filename, os.ST_WRITE | os.ST_APPEND)
+    except AttributeError:
+        logging.error("""
+    XXX FIXME: Travis chokes on `os.ST_WRITE` saying that the module doesn't
+               have that attribute, for some reason:
+    https://travis-ci.org/isislovecruft/bridgedb/builds/24145963#L1601""";)
+        os.chmod(filename, 384)
 
     fileHandler = partial(logging.handlers.RotatingFileHandler,
                           filename,



_______________________________________________
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits

Reply via email to