mirror of https://gitlab.com/bashrc2/epicyon
Remove spaces from patch filename
parent
9c3ce88e8d
commit
b458e06feb
14
git.py
14
git.py
|
@ -88,7 +88,9 @@ def receiveGitPatch(baseDir: str, nickname: str, domain: str,
|
||||||
for line in patchLines:
|
for line in patchLines:
|
||||||
if line.startswith('Subject:'):
|
if line.startswith('Subject:'):
|
||||||
patchSubject = \
|
patchSubject = \
|
||||||
line.replace('Subject:', '').replace('/', '|').strip()
|
line.replace('Subject:', '').replace('/', '|')
|
||||||
|
patchSubject = patchSubject.replace('[PATCH]', '').strip()
|
||||||
|
patchSubject = patchSubject.replace(' ', '_')
|
||||||
projectName = \
|
projectName = \
|
||||||
getGitProjectName(baseDir, nickname, domain, subject)
|
getGitProjectName(baseDir, nickname, domain, subject)
|
||||||
patchDir = \
|
patchDir = \
|
||||||
|
@ -99,9 +101,7 @@ def receiveGitPatch(baseDir: str, nickname: str, domain: str,
|
||||||
break
|
break
|
||||||
if not patchFilename:
|
if not patchFilename:
|
||||||
return False
|
return False
|
||||||
patchFile = open(patchFilename, "w")
|
with open(patchFilename, "w") as patchFile:
|
||||||
if not patchFile:
|
patchFile.write(contentStr)
|
||||||
return False
|
return True
|
||||||
patchFile.write(contentStr)
|
return False
|
||||||
patchFile.close()
|
|
||||||
return True
|
|
||||||
|
|
Loading…
Reference in New Issue