From 27c31e2fde54c0587c032ccffdaa7c4ddf5b2ae5 Mon Sep 17 00:00:00 2001 From: Sebastian Thiel Date: Thu, 15 Jan 2015 16:03:47 +0100 Subject: Added the first submodule will no longer cause an IOError. This is verified by the respective test. Fixes #117 --- git/objects/submodule/base.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'git/objects/submodule/base.py') diff --git a/git/objects/submodule/base.py b/git/objects/submodule/base.py index 0ec6f656..0bd34999 100644 --- a/git/objects/submodule/base.py +++ b/git/objects/submodule/base.py @@ -159,7 +159,7 @@ class Submodule(util.IndexObject, Iterable, Traversable): if not repo.bare and parent_matches_head: fp_module = cls.k_modules_file fp_module_path = os.path.join(repo.working_tree_dir, fp_module) - if not os.path.isfile(fp_module_path): + if read_only and not os.path.isfile(fp_module_path): raise IOError("%s file was not accessible" % fp_module_path) # END handle existance fp_module = fp_module_path -- cgit v1.2.1