From cf9a1617599bb680deef2bab76fc6022f7dad50b Mon Sep 17 00:00:00 2001 From: "Rafael H. Schloming" Date: Tue, 4 Mar 2008 20:23:38 +0000 Subject: 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 --- python/qpid/util.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'python/qpid/util.py') 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 -- cgit v1.2.1