X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=daklib%2Fupload.py;h=8b2aabf038212bc6019287e00c8d9c7a6c99783e;hb=9a095db72da5d19d08d8787af1f692cdd552b940;hp=b78d100fe55c5e59d48f03338a9ec11a9a0edff9;hpb=64292a3e28c69cb7a816830c858f8503d6995a98;p=dak.git diff --git a/daklib/upload.py b/daklib/upload.py index b78d100f..8b2aabf0 100644 --- a/daklib/upload.py +++ b/daklib/upload.py @@ -462,6 +462,9 @@ class Binary(object): @type: dict-like """ + def is_debug(self): + return self.section == "debug" + @classmethod def from_file(cls, directory, filename): hashed_file = HashedFile.from_file(directory, filename) @@ -497,6 +500,13 @@ class Binary(object): raise InvalidBinaryException('{0}: Does not match re_file_binary'.format(self.hashed_file.filename)) return match.group('type') + @property + def section(self): + """section name + @type: str + """ + return self.control['Section'].split('/', 1)[-1] + @property def component(self): """component name