From a4e023cb07e4cb9fdca26fca0049eff5d71119d4 Mon Sep 17 00:00:00 2001 From: "gcode@loowis.durge.org" Date: Sat, 1 Sep 2012 11:42:13 +0000 Subject: Prevent files being opened with '+' in the mode string. Fixes Issue 129 git-svn-id: http://pyfilesystem.googlecode.com/svn/trunk@814 67cdc799-7952-0410-af00-57a81ceafa0f --- fs/wrapfs/readonlyfs.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/wrapfs/readonlyfs.py b/fs/wrapfs/readonlyfs.py index 6959c55..5714745 100644 --- a/fs/wrapfs/readonlyfs.py +++ b/fs/wrapfs/readonlyfs.py @@ -40,7 +40,7 @@ class ReadOnlyFS(WrapFS): def open(self, path, mode='r', **kwargs): """ Only permit read access """ - if 'w' in mode or 'a' in mode: + if 'w' in mode or 'a' in mode or '+' in mode: raise UnsupportedError('write') return super(ReadOnlyFS, self).open(path, mode, **kwargs) -- cgit v1.2.1