summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDirk Mallunat <s4msung@exigen.org>2016-07-08 20:42:56 +0200
committerFlorian Pritz <bluewind@xinu.at>2016-07-08 20:47:31 +0200
commit100bb5729a98e3cebd65d7138fe08630205be762 (patch)
tree9f3f10e1061ece242760c18dae8606e282443d38
parent74af7b06ba8ff2f1953816fe64fc9fa76148f3d5 (diff)
fix error with non ascii chars in filename
-rwxr-xr-xfb.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/fb.py b/fb.py
index acfc3e6..7497ee2 100755
--- a/fb.py
+++ b/fb.py
@@ -99,7 +99,7 @@ class CURLWrapper:
def __add_post(self, data):
for item in data:
for key, value in item.items():
- self.post.append((key, (pycurl.FORM_CONTENTS, value)))
+ self.post.append((key, (pycurl.FORM_CONTENTS, value.encode('utf-8'))))
def getServerConfig(self):
if self.serverConfig is None:
@@ -151,7 +151,7 @@ class CURLWrapper:
for file in chunk:
counter+=1
self.post.append(
- ("file["+str(counter)+"]", (pycurl.FORM_FILE, file.path))
+ ("file["+str(counter)+"]", (pycurl.FORM_FILE, file.path.encode('utf-8')))
)
ret = self.send_post_progress("/file/upload", [])
rets["ids"] += ret["ids"]