Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def savePlaces(self):
if self.current_places == None:
self.logger.warning("No places loaded")
return None
path = qi.path.userWritableDataPath(self.application_name, self.current_places["name"] + self.places_extension)
out_file = open(path, "wb")
self.logger.info("places to save: " + str(self.current_places))
pickle.dump(self.current_places, out_file)
out_file.close()
self.logger.info("places saved to : " + path)
return path