From 33feeb837bbceabc4b636c1bc331fd0dab8b0c60 Mon Sep 17 00:00:00 2001 From: Khai Do Date: Thu, 17 Nov 2016 16:56:56 -0800 Subject: [PATCH] Allow creating projects with spaces Gerrit supports creating projects that contain spaces in it. Quote the project name otherwise the command will fail when user attempts to create a project with spaces in it. Change-Id: Ie1db92812355b4d8f7603c3b4b8d20434ca54bb3 --- gerritlib/gerrit.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gerritlib/gerrit.py b/gerritlib/gerrit.py index b994314..176ccf1 100644 --- a/gerritlib/gerrit.py +++ b/gerritlib/gerrit.py @@ -221,7 +221,7 @@ class Gerrit(object): if description: cmd = "%s --description \"%s\"" % \ (cmd, description.replace('"', r'\"')) - cmd = '%s --name %s' % (cmd, project) + cmd = '%s --name "%s"' % (cmd, project) out, err = self._ssh(cmd) return err