From b54b9399920375f0bab14ff8495c0ea3f5fa1c33 Mon Sep 17 00:00:00 2001 From: Sebastian Thiel Date: Thu, 22 Jan 2015 12:40:07 +0100 Subject: Overhauled all tutorials, and placed them in a unit-test. That way they are protected from regression. Fixes #239 --- git/objects/submodule/base.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'git/objects/submodule/base.py') diff --git a/git/objects/submodule/base.py b/git/objects/submodule/base.py index 94322a55..be243acc 100644 --- a/git/objects/submodule/base.py +++ b/git/objects/submodule/base.py @@ -770,7 +770,7 @@ class Submodule(util.IndexObject, Iterable, Traversable): an inconsistent state :raise InvalidGitRepositoryError: thrown if the repository cannot be deleted :raise OSError: if directories or files could not be removed""" - if not (module + configuration): + if not (module or configuration): raise ValueError("Need to specify to delete at least the module, or the configuration") # END handle parameters @@ -784,7 +784,7 @@ class Submodule(util.IndexObject, Iterable, Traversable): if configuration and not dry_run and nc > 0: # Assure we don't leave the parent repository in a dirty state, and commit our changes # It's important for recursive, unforced, deletions to work as expected - self.module().index.commit("Removed submodule '%s'" % self.name) + self.module().index.commit("Removed at least one of child-modules of '%s'" % self.name) # end handle recursion # DELETE REPOSITORY WORKING TREE -- cgit v1.2.1