2
0
mirror of https://expo.survex.com/repositories/troggle/.git synced 2025-01-19 09:22:32 +00:00
This commit is contained in:
Martin Green 2022-06-19 01:12:49 +01:00
parent 84693b6524
commit 18dbb847e3

View File

@ -341,7 +341,7 @@ def editexpopage(request, path):
return render(request,'errors/generic.html', {'message': message})
try:
cp_add = subprocess.run([git, "add", filename], cwd=cwd, capture_output=True, text=True)
cp_add = subprocess.run([git, "add", filename.encode(sysdefaultencoding)], cwd=cwd, capture_output=True, text=True)
if cp_add.returncode != 0:
msgdata = 'Ask a nerd to fix this.\n\n' + cp_add.stderr + '\n\n' + cp_add.stdout + '\n\nreturn code: ' + str(cp_add.returncode)
message = f'CANNOT git on server for this file {filename}. Edits saved but not added to git.\n\n' + msgdata