summaryrefslogtreecommitdiff
path: root/git/objects/submodule/base.py
diff options
context:
space:
mode:
Diffstat (limited to 'git/objects/submodule/base.py')
-rw-r--r--git/objects/submodule/base.py2
1 files changed, 1 insertions, 1 deletions
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