~mdeslaur/apport/machooks

« back to all changes in this revision

Viewing changes to backends/packaging-apt-dpkg.py

  • Committer: Martin Pitt
  • Date: 2011-06-22 08:41:06 UTC
  • Revision ID: martin.pitt@canonical.com-20110622084106-2iz0tcrmrtdi0ns1
backends/packaging-apt-dpkg.py: Fix crash introduced in 1.21.1's multiarch fixes.

Show diffs side-by-side

added added

removed removed

Lines of Context:
258
258
        else:
259
259
            return None
260
260
 
261
 
    def get_system_architecture(self):
 
261
    @classmethod
 
262
    def get_system_architecture(klass):
262
263
        '''Return the architecture of the system, in the notation used by the
263
264
        particular distribution.'''
264
265
 
790
791
        for c in cache.getChanges():
791
792
            for script in ('postinst', 'prerm', 'postrm'):
792
793
                try:
793
 
                    os.unlink('/var/lib/dpkg/info/%s:%s.%s' % (c.name, self.get_system_architecture(), script))
 
794
                    os.unlink('/var/lib/dpkg/info/%s:%s.%s' % (c.name, klass.get_system_architecture(), script))
794
795
                except OSError:
795
796
                    pass
796
797
                try: