Loading cloudcontrol/server/conf.py +3 −1 Original line number Diff line number Diff line Loading @@ -122,7 +122,9 @@ class CCConf(object): filename = os.path.join(self._path, '%s.json' % login) self.logger.debug('Writing configuration %s: %s', filename, conf) if os.path.isfile(filename) ^ create: json.dump(conf, open(filename, 'w')) with open(filename + '.tmp', 'w') as ftmp: json.dump(conf, ftmp) os.rename(filename + '.tmp', filename) else: raise CCConf.UnknownAccount('%s is not a file' % filename) Loading Loading
cloudcontrol/server/conf.py +3 −1 Original line number Diff line number Diff line Loading @@ -122,7 +122,9 @@ class CCConf(object): filename = os.path.join(self._path, '%s.json' % login) self.logger.debug('Writing configuration %s: %s', filename, conf) if os.path.isfile(filename) ^ create: json.dump(conf, open(filename, 'w')) with open(filename + '.tmp', 'w') as ftmp: json.dump(conf, ftmp) os.rename(filename + '.tmp', filename) else: raise CCConf.UnknownAccount('%s is not a file' % filename) Loading