From: Ansgar Burchardt Date: Sat, 7 Jul 2012 17:38:42 +0000 (-0600) Subject: daklib/dbconn.py: add basename property to PoolFile X-Git-Url: https://git.decadent.org.uk/gitweb/?a=commitdiff_plain;h=0f00e503e04dd38e7fa14bb4086e1e15d3c9a8dc;p=dak.git daklib/dbconn.py: add basename property to PoolFile --- 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