~larryprice/libertine/python-i18n

« back to all changes in this revision

Viewing changes to python/libertine/ContainerControlClient.py

  • Committer: Larry Price
  • Date: 2017-03-23 19:23:20 UTC
  • Revision ID: larry.price@canonical.com-20170323192320-upi3h8wxp04z9y5n
moving gettext fetch to utils

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
import dbus
17
17
import time
18
18
 
19
 
import gettext
20
 
gettext.textdomain('libertine')
21
 
_ = gettext.gettext
22
 
 
23
19
from . import utils
24
20
 
25
21
 
42
38
                self._control = bus.get_object(constants.SERVICE_NAME, constants.CONTAINER_CONTROL_OBJECT)
43
39
                self._interface = constants.CONTAINER_CONTROL_INTERFACE
44
40
        except ImportError as e:
45
 
            utils.get_logger().warning(_("Libertine service libraries not installed."))
 
41
            utils.get_logger().warning(utils._("Libertine service libraries not installed."))
46
42
        except dbus.exceptions.DBusException as e:
47
 
            utils.get_logger().warning(_("Exception raised while discovering d-bus service: {error}").format(error=str(e)))
 
43
            utils.get_logger().warning(utils._("Exception raised while discovering d-bus service: {error}").format(error=str(e)))
48
44
 
49
45
    def _do_operation(self, operation):
50
46
        # It's possible that the service has gone down from when first getting the object.