aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTianyu Li <tianyu.li@arm.com>2021-04-14 12:36:20 +0800
committerOle Tr�an <otroan@employees.org>2021-04-15 16:35:45 +0000
commit0e79bc14babb282f8ba0dca2237209da80be6317 (patch)
treeca6d212702e249b3d40c47a822d186f366493881
parent7f57f50d0c516a0e54829b0e99aeb1908862595d (diff)
papi: fix ubuntu 1804 make test socket.close error
make test failed on ubuntu 18.04 File "/vpp/src/vpp-api/python/vpp_papi/vpp_stats.py", line 135, in connect socket.close(mfd) AttributeError: module 'socket' has no attribute 'close' Due to ubuntu 18.04 using python3.6 and socket.close() is introduced since python3.7 Using os.close to replace socket.close as mfd is a memory fd Type: fix Signed-off-by: Tianyu Li <tianyu.li@arm.com> Change-Id: I6d980fc87ae6c77bbed416879f9b2fcd0a0abe6a
-rwxr-xr-xsrc/vpp-api/python/vpp_papi/vpp_stats.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/vpp-api/python/vpp_papi/vpp_stats.py b/src/vpp-api/python/vpp_papi/vpp_stats.py
index 18f13e9c4c0..919df7e48b8 100755
--- a/src/vpp-api/python/vpp_papi/vpp_stats.py
+++ b/src/vpp-api/python/vpp_papi/vpp_stats.py
@@ -132,7 +132,7 @@ class VPPStats():
stat_result = os.fstat(mfd)
self.statseg = mmap.mmap(mfd, stat_result.st_size, mmap.PROT_READ, mmap.MAP_SHARED)
- socket.close(mfd)
+ os.close(mfd)
self.size = stat_result.st_size
if self.version != 2:
a833'>diffstats
path: root/GPL/traffic_profiles/trex/trex-stl-ethip4-ip4dst8-udir.py
blob: c6d383cfd8abcdaa3f6c76e7e17b8a50e4924ed9 (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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107