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
This commit is contained in:
Khai Do 2016-11-17 16:56:56 -08:00
parent fba7102ae4
commit 33feeb837b
1 changed files with 1 additions and 1 deletions

View File

@ -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