]> git.decadent.org.uk Git - dak.git/commitdiff
daklib/dbconn.py: add basename property to PoolFile
authorAnsgar Burchardt <ansgar@debian.org>
Sat, 7 Jul 2012 17:38:42 +0000 (11:38 -0600)
committerAnsgar Burchardt <ansgar@debian.org>
Tue, 24 Jul 2012 09:06:58 +0000 (11:06 +0200)
daklib/dbconn.py

index ca6befea8677dfd1ad5f94a51a42ef85410638d3..72dbaad0f615c8ceda12b13b2163b095bdf2362f 100755 (executable)
@@ -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