~timo-jyrinki/ubuntu/trusty/pitivi/backport_utopic_fixes

« back to all changes in this revision

Viewing changes to pitivi/log/loggable.py

  • Committer: Bazaar Package Importer
  • Author(s): Sebastien Bacher
  • Date: 2011-05-26 15:29:58 UTC
  • mfrom: (3.1.20 experimental)
  • Revision ID: james.westby@ubuntu.com-20110526152958-90je1myzzjly26vw
Tags: 0.13.9.90-1ubuntu1
* Resynchronize on Debian
* debian/control:
  - Depend on python-launchpad-integration
  - Drop hal from Recommends to Suggests. This version has the patch applied
    to not crash without hal.
* debian/patches/01_lpi.patch:
  - launchpad integration  
* debian/rules:
  - Use gnome.mk so a translation template is built

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
from pitivi.log.log import _canShortcutLogging, doLog, ERROR
23
23
from pitivi.log import log
24
24
 
25
 
def _errorObject(object, cat, format, *args):
26
 
    """
27
 
    Log a fatal error message in the given category.
28
 
    This will also raise a L{SystemExit}.
29
 
    """
30
 
    doLog(ERROR, object, cat, format, args)
31
 
 
32
25
class Loggable(log.Loggable):
33
26
    def __init__(self):
34
27
        if not hasattr(self, 'logCategory'):
40
33
            return "<%s at 0x%x>" % (self.__class__.__name__, id(self))
41
34
        return res
42
35
 
43
 
    def error(self, *args):
 
36
    def error(self, format, *args):
44
37
        if _canShortcutLogging(self.logCategory, ERROR):
45
38
            return
46
 
        _errorObject(self.logObjectName(), self.logCategory,
47
 
            *self.logFunction(*args))
 
39
        doLog(ERROR, self.logObjectName(), self.logCategory,
 
40
            format, self.logFunction(*args), where=-2)