[tor-commits] [bridgedb/master] Fix bug resulting from use of fd.close() instead of os.close(fd).

isis at torproject.org isis at torproject.org
Sun Jan 12 06:06:31 UTC 2014


commit f1c8d5204bfc71cdc3ddee1fd135856ec9ec1c56
Author: Isis Lovecruft <isis at torproject.org>
Date:   Tue Nov 5 08:09:19 2013 +0000

    Fix bug resulting from use of fd.close() instead of os.close(fd).
---
 lib/bridgedb/crypto.py |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/bridgedb/crypto.py b/lib/bridgedb/crypto.py
index 70e9ee1..d67966d 100644
--- a/lib/bridgedb/crypto.py
+++ b/lib/bridgedb/crypto.py
@@ -50,7 +50,7 @@ def getKey(filename):
         fd = os.open(filename, flags, 0400)
         os.write(fd, key)
         os.fsync(fd)
-        fd.close()
+        os.close(fd)
     else:
         logging.debug("getKey(): Secret key file found. Loading...")
         key = fh.read()





More information about the tor-commits mailing list