Ubuntu Pastebin

Paste from sergiusens at Wed, 28 Sep 2016 15:38:19 +0000

Download as text
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
diff --git a/snapcraft/internal/pluginhandler.py b/snapcraft/internal/pluginhandler.py
index 8dbd101..e219f2d 100644
--- a/snapcraft/internal/pluginhandler.py
+++ b/snapcraft/internal/pluginhandler.py
@@ -716,6 +716,8 @@ def _find_dependencies(root, part_files):
 
     elf_files = set()
 
+    fs_encoding = sys.getfilesystemencoding()
+
     for part_file in part_files:
         # Filter out object (*.o) files-- we only care about binaries.
         if part_file.endswith('.o'):
@@ -728,6 +730,8 @@ def _find_dependencies(root, part_files):
                 path))
             continue
 
+        path = path.encode(fs_encoding, errors='surrogateescape')
+        print(path)
         # Finally, make sure this is actually an ELF before queueing it up
         # for an ldd call.
         file_m = ms.file(path)
Download as text