summaryrefslogtreecommitdiff
path: root/gitlab/v4/objects/repositories.py
diff options
context:
space:
mode:
authorJohn L. Villalovos <john@sodarock.com>2022-01-08 13:58:04 -0800
committerJohn L. Villalovos <john@sodarock.com>2022-01-08 13:58:04 -0800
commit8c17afafcc7d9d2a8fecb53b853c2b4f004c4121 (patch)
tree10193bc1178dab265df9cd8fa31cff278e6ad909 /gitlab/v4/objects/repositories.py
parentd45b59e800a14460a1ecdad2d750e42aa99bb96e (diff)
downloadgitlab-jlvillal/remove_replace.tar.gz
chore: remove custom URL encodingjlvillal/remove_replace
We were using `str.replace()` calls to take care of URL encoding issues. Switch them to use our `utils.clean_str_id` which itself uses `urllib.parse.quote()` Closes: #1356
Diffstat (limited to 'gitlab/v4/objects/repositories.py')
-rw-r--r--gitlab/v4/objects/repositories.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/gitlab/v4/objects/repositories.py b/gitlab/v4/objects/repositories.py
index b520ab7..60a94fe 100644
--- a/gitlab/v4/objects/repositories.py
+++ b/gitlab/v4/objects/repositories.py
@@ -39,7 +39,7 @@ class RepositoryMixin(_RestObjectBase):
GitlabPutError: If the submodule could not be updated
"""
- submodule = submodule.replace("/", "%2F") # .replace('.', '%2E')
+ submodule = utils.clean_str_id(submodule)
path = f"/projects/{self.get_id()}/repository/submodules/{submodule}"
data = {"branch": branch, "commit_sha": commit_sha}
if "commit_message" in kwargs: