From 18dbb847e360a45f5ae7fb6bdaf225ddb49e1610 Mon Sep 17 00:00:00 2001 From: Martin Green Date: Sun, 19 Jun 2022 01:12:49 +0100 Subject: [PATCH] test --- core/views/expo.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/views/expo.py b/core/views/expo.py index 57f6eb8..8d67f6f 100644 --- a/core/views/expo.py +++ b/core/views/expo.py @@ -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