diff options
author | Mathieu Blondel <mathieu@mblondel.org> | 2010-05-12 23:15:09 +0000 |
---|---|---|
committer | Mathieu Blondel <mathieu@mblondel.org> | 2010-05-12 23:15:09 +0000 |
commit | ea5f2af2da8043f2ee6b4233b552a1ea3c76da2a (patch) | |
tree | 02536863efbc3e3bbaaa1c787c4b1a0be6fb894d | |
parent | f9574d04652c557a0348cdfe537316a9c55b219c (diff) | |
download | wikipediafs-ea5f2af2da8043f2ee6b4233b552a1ea3c76da2a.tar.gz |
If the write attempt fails, try logging in again and writing again.
git-svn-id: http://svn.code.sf.net/p/wikipediafs/code/trunk@69 59acd704-e115-0410-a914-e735a229ed7c
-rw-r--r-- | src/wikipediafs/fs.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/wikipediafs/fs.py b/src/wikipediafs/fs.py index 42c94e5..0c5b856 100644 --- a/src/wikipediafs/fs.py +++ b/src/wikipediafs/fs.py @@ -110,8 +110,13 @@ class ArticleDir: return txt def write_to(self, path, txt): - art = self.get_art(path); - return art.set(txt) + art = self.get_art(path) + ret = art.set(txt) + if (ret == False): + self.set_cookie_string(1) + ret = art.set(txt) + + return ret def size(self, path): LOGGER.debug("FSdir size %s" % (path)) |