From 71be1a56b821e6ef830bb7132c89d5267b869b15 Mon Sep 17 00:00:00 2001 From: Guillaume Ayoub Date: Tue, 2 Aug 2016 12:11:38 +0200 Subject: [PATCH] Change find_available_file_name into private method --- radicale/storage.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/radicale/storage.py b/radicale/storage.py index a425a28..dd5290a 100644 --- a/radicale/storage.py +++ b/radicale/storage.py @@ -347,7 +347,7 @@ class Collection(BaseCollection): path, self.storage_encoding, mode).open() as fd: yield fd - def find_available_file_name(self): + def _find_available_file_name(self): # Prevent infinite loop for _ in range(10000): file_name = hex(getrandbits(32))[2:] @@ -430,13 +430,13 @@ class Collection(BaseCollection): for item in items: new_collection.add(item) self.upload( - self.find_available_file_name(), new_collection) + self._find_available_file_name(), new_collection) elif tag == "VCARD": self.set_meta("tag", "VADDRESSBOOK") if collection: for card in collection: - self.upload(self.find_available_file_name(), card) + self.upload(self._find_available_file_name(), card) return self