~ubuntu-branches/ubuntu/vivid/ceilometer/vivid-proposed

« back to all changes in this revision

Viewing changes to ceilometer/openstack/common/fileutils.py

  • Committer: Package Import Robot
  • Author(s): Chuck Short
  • Date: 2014-06-13 13:20:35 UTC
  • mfrom: (1.1.17)
  • Revision ID: package-import@ubuntu.com-20140613132035-42ibzh8j7ww2q31i
Tags: 2014.2~b1-0ubuntu1
* New upstream release.
* debian/control: Open up juno release
* debian/patches/fix-requirements.patch: Refreshed.
* debian/rules: Patch the ceilometer.conf.sample directly since
  the configuration files are generated by a tool.
* debian/ceilometer-common.install: Drop sources.json.

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
import tempfile
20
20
 
21
21
from ceilometer.openstack.common import excutils
22
 
from ceilometer.openstack.common.gettextutils import _
23
22
from ceilometer.openstack.common import log as logging
24
23
 
25
24
LOG = logging.getLogger(__name__)
59
58
    cache_info = _FILE_CACHE.setdefault(filename, {})
60
59
 
61
60
    if not cache_info or mtime > cache_info.get('mtime', 0):
62
 
        LOG.debug(_("Reloading cached file %s") % filename)
 
61
        LOG.debug("Reloading cached file %s" % filename)
63
62
        with open(filename) as fap:
64
63
            cache_info['data'] = fap.read()
65
64
        cache_info['mtime'] = mtime