Selaa lähdekoodia

HUE-1559 [core] app registry should truncate and overwrite

Abraham Elmahrek 12 vuotta sitten
vanhempi
commit
ba25522
1 muutettua tiedostoa jossa 1 lisäystä ja 3 poistoa
  1. 1 3
      tools/app_reg/registry.py

+ 1 - 3
tools/app_reg/registry.py

@@ -107,9 +107,7 @@ class AppRegistry(object):
     """Save and write out the registry"""
     assert self._initialized, "Registry not yet initialized"
 
-    tmp_path = self._reg_path + '.new'
-    self._write(tmp_path)
-    os.rename(tmp_path, self._reg_path)
+    self._write(self._reg_path)
     LOG.info('=== Saved registry at %s' % (self._reg_path,))