예제 #1
0
 def store(self):
     build_cache = self.bld_root.make_node(BUILD_CACHE)
     tmp_fid = open(build_cache.abspath() + ".tmp", "wb")
     try:
         dump(self.cache, tmp_fid)
     finally:
         tmp_fid.close()
     rename(build_cache.abspath() + ".tmp", build_cache.abspath())
예제 #2
0
파일: context.py 프로젝트: abadger/Bento
 def store(self):
     build_cache = self.bld_root.make_node(BUILD_CACHE)
     tmp_fid = open(build_cache.abspath() + ".tmp", "wb")
     try:
         dump(self.cache, tmp_fid)
     finally:
         tmp_fid.close()
     rename(build_cache.abspath() + ".tmp", build_cache.abspath())
 def save(self):
     # Use rename to avoid corrupting the cache if interrupted
     tmp_fid = open(CACHE_FILE + ".tmp", "w")
     try:
         dump(self.cache, tmp_fid)
     finally:
         tmp_fid.close()
     rename(CACHE_FILE + ".tmp", CACHE_FILE)
예제 #4
0
 def save(self):
     # Use rename to avoid corrupting the cache if interrupted
     tmp_fid = open(CACHE_FILE + ".tmp", "w")
     try:
         dump(self.cache, tmp_fid)
     finally:
         tmp_fid.close()
     rename(CACHE_FILE + ".tmp", CACHE_FILE)
예제 #5
0
파일: context.py 프로젝트: dagss/yaku
 def store(self):
     # Use rename to avoid corrupting the cache if interrupted
     tmp_fid = open(BUILD_CACHE + ".tmp", "wb")
     try:
         dump(self.cache, tmp_fid)
     finally:
         tmp_fid.close()
     rename(BUILD_CACHE + ".tmp", BUILD_CACHE)
예제 #6
0
파일: environment.py 프로젝트: B-Rich/Bento
 def store(self, filename):
     tmp = filename + ".tmp"
     ensure_dir(tmp)
     fid = open(tmp, "w")
     try:
         for k in sorted(self.keys()):
             fid.write("%s = %r\n" % (k, self[k]))
     finally:
         fid.close()
     rename(tmp, filename)
 def store(self, filename):
     tmp = filename + ".tmp"
     ensure_dir(tmp)
     fid = open(tmp, "w")
     try:
         for k in sorted(self.keys()):
             fid.write("%s = %r\n" % (k, self[k]))
     finally:
         fid.close()
     rename(tmp, filename)