[Piuparts-commits] [piuparts] 09/09: lib/db: LogDB: add stat() method

Holger Levsen holger at moszumanska.debian.org
Sun Feb 9 20:59:28 UTC 2014


This is an automated email from the git hooks/post-receive script.

holger pushed a commit to branch develop
in repository piuparts.

commit 9b8ddf87ee70b7f75b04e8c2c2d0c4271111fc15
Author: Andreas Beckmann <anbe at debian.org>
Date:   Sun Nov 24 03:24:46 2013 +0100

    lib/db: LogDB: add stat() method
    
    Signed-off-by: Andreas Beckmann <anbe at debian.org>
---
 piupartslib/packagesdb.py | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/piupartslib/packagesdb.py b/piupartslib/packagesdb.py
index 8d3fe9e..1722741 100644
--- a/piupartslib/packagesdb.py
+++ b/piupartslib/packagesdb.py
@@ -30,6 +30,7 @@ Lars Wirzenius <liw at iki.fi>
 import logging
 import os
 import random
+import stat
 import tempfile
 import time
 import UserDict
@@ -236,6 +237,10 @@ class LogDB:
             self.remove_file(full_name)
         self._evict(full_name)
 
+    def stat(self, subdir, package, version):
+        full_name = os.path.join(subdir, self._log_name(package, version))
+        return os.stat(full_name)
+
 
 class LogfileExists(Exception):
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/piuparts/piuparts.git



More information about the Piuparts-commits mailing list