diff --git a/debian/changelog b/debian/changelog index 2a8debf1b2d0e18094a29f7be285f788b430e190..1120fd8ec32e5b962a92b0205b5c108c6c62bfc9 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +dcpman (0.1.5) UNRELEASED; urgency=medium + + * Tagged debian/0.1.4 + * modified: debian/changelog modified: fabfile.py + * Now logs exception as well. + + -- Adar Nimrod <nimrod@shore.co.il> Sun, 28 Sep 2014 10:03:55 +0300 + dcpman (0.1.4) unstable; urgency=medium * Tagged debian/0.1.4 diff --git a/fabfile.py b/fabfile.py index 11795ae1cb95e0b7d39f8c7fad4490e7554dc133..712a616a2596c3c876f35f327b2eb70b9e42085b 100644 --- a/fabfile.py +++ b/fabfile.py @@ -11,7 +11,6 @@ def publish (): @task def build (): - #local ('''git dch -a''') local ('''dpkg-buildpackage -us -uc''') @task @@ -25,4 +24,4 @@ def clean (): @task def push (): - local ('''git push --all gitweb''') + local ('''git push --all gitdaemon''') diff --git a/source/dcp.py b/source/dcp.py index 428728a841b046b00022f5a636685270f89212db..7139bb5f05d4348ea5c8d80445a63167b87bb3a8 100755 --- a/source/dcp.py +++ b/source/dcp.py @@ -180,6 +180,21 @@ class DCP: except BaseException as e: raise RuntimeError ('Failed to parse packinglist file') from e + def _find_cpl (self): + '''Goes through the xml files, finds the CPL and extracts the data from + it.''' + for asset in [x for x in self.assets if hasattr (x, 'type') and x.type.find ('xml') > -1]: + elements = (parse (asset.fullpath)).getElementsByTagName \ + ('CompositionPlaylist') + if len (elements) > 0: + try: + self.cpl_id = elements[0].getElementsByTagName \ + ('Id')[0].firstChild.data + self.cpl_date = elements[0].getElementsByTagName \ + ('IssueDate')[0].firstChild.data + except: + pass + def __init__ (self, directory): '''Parses the DCP in the directory specified.''' self.directory = directory @@ -191,6 +206,7 @@ class DCP: (x, 'duration')]) except: self.duration = 'Unknown' + self._find_cpl () def copyAndVerify (self, destination): '''Copies the DCP to the destination directory and verifies during.'''