summaryrefslogtreecommitdiff
path: root/python/qpid/util.py
diff options
context:
space:
mode:
authorRafael H. Schloming <rhs@apache.org>2008-03-04 20:23:38 +0000
committerRafael H. Schloming <rhs@apache.org>2008-03-04 20:23:38 +0000
commitcf9a1617599bb680deef2bab76fc6022f7dad50b (patch)
tree9692afac5d2b5b1c3043601ec66332b8211950d7 /python/qpid/util.py
parent75f598b22ea4573cff2d47fdd689b85cee5dd88d (diff)
downloadqpid-python-cf9a1617599bb680deef2bab76fc6022f7dad50b.tar.gz
check the mtime of the cached spec against the code that generates it
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@633623 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'python/qpid/util.py')
-rw-r--r--python/qpid/util.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/python/qpid/util.py b/python/qpid/util.py
index c88cc0c9d6..e41dfc75fb 100644
--- a/python/qpid/util.py
+++ b/python/qpid/util.py
@@ -17,7 +17,7 @@
# under the License.
#
-import socket
+import os, socket
def connect(host, port):
sock = socket.socket()
@@ -37,3 +37,6 @@ def listen(host, port, predicate = lambda: True, bound = lambda: None):
while predicate():
s, a = sock.accept()
yield s
+
+def mtime(filename):
+ return os.stat(filename).st_mtime