From 0f00e503e04dd38e7fa14bb4086e1e15d3c9a8dc Mon Sep 17 00:00:00 2001 From: Ansgar Burchardt Date: Sat, 7 Jul 2012 11:38:42 -0600 Subject: [PATCH] daklib/dbconn.py: add basename property to PoolFile --- daklib/dbconn.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/daklib/dbconn.py b/daklib/dbconn.py index ca6befea..72dbaad0 100755 --- a/daklib/dbconn.py +++ b/daklib/dbconn.py @@ -1423,6 +1423,10 @@ class PoolFile(ORMObject): def fullpath(self): return os.path.join(self.location.path, self.filename) + @property + def basename(self): + return os.path.basename(self.filename) + def is_valid(self, filesize = -1, md5sum = None): return self.filesize == long(filesize) and self.md5sum == md5sum -- 2.39.5