~didrocks/oneconf/oneconf-test

« back to all changes in this revision

Viewing changes to oneconf/hosts.py

  • Committer: Didier Roche
  • Date: 2012-06-04 08:46:41 UTC
  • Revision ID: didrocks@ubuntu.com-20120604084641-bk15mmexwtljlayd
really change the mtime and fix a type issue

Show diffs side-by-side

added added

removed removed

Lines of Context:
110
110
            return ('', '')
111
111
        file_path = file_path.replace("file://", "")
112
112
        if not file_mtime:
113
 
            file_mtime = os.stat(file_path).st_mtime
 
113
            file_mtime = str(os.stat(file_path).st_mtime)
114
114
        try:
115
 
            logo_checksum = "%s%f" % (hashlib.sha224(file_path).hexdigest(), file_mtime)
 
115
            logo_checksum = "%s%s" % (hashlib.sha224(file_path).hexdigest(), file_mtime)
116
116
        except OSError:
117
117
            logo_checksum = None
118
118
            file_path = None