aboutsummaryrefslogtreecommitdiffstats
path: root/recipes-devtools/python/python3-dosocs2/0001-Fix-a-error-as-fowllowing.patch
blob: 870201d408097420864a00c540498ef00a0c164d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
From 957574355fe80e0dfb86d7318cdd105e472294a4 Mon Sep 17 00:00:00 2001
From: Lei Maohui <leimaohui@cn.fujitsu.com>
Date: Sun, 12 Nov 2017 00:37:10 +0900
Subject: [PATCH] Fix a error as fowllowing:

" TypeError: cannot use a string pattern on a bytes-like object"

Signed-off-by: Lei Maohui <leimaohui@cn.fujitsu.com>
---
 dosocs2/scanners/nomos.py | 1 +
 1 file changed, 1 insertion(+)

diff --git a/dosocs2/scanners/nomos.py b/dosocs2/scanners/nomos.py
index e4f2901..ebdde74 100644
--- a/dosocs2/scanners/nomos.py
+++ b/dosocs2/scanners/nomos.py
@@ -34,6 +34,7 @@ class Nomos(scannerbase.FileLicenseScanner):
             return ''
 
     def _get_licenses(self, file, nomos_output):
+        nomos_output = nomos_output.decode('utf-8')
         parsed_output = [
             Nomos.Evidence(*item)
             for item in re.findall(self.search_pattern, nomos_output)
-- 
2.7.4