Merge lp:~costales/gui-ufw/redone-list-interfaces into lp:gui-ufw

Proposed by costales
Status: Merged
Approved by: costales
Approved revision: 7
Merged at revision: 7
Proposed branch: lp:~costales/gui-ufw/redone-list-interfaces
Merge into: lp:gui-ufw
Diff against target: 36 lines (+4/-6)
2 files modified
gufw/gufw/model/ufw_backend.py (+3/-5)
po/gufw.pot (+1/-1)
To merge this branch: bzr merge lp:~costales/gui-ufw/redone-list-interfaces
Reviewer Review Type Date Requested Status
costales Pending
Review via email: mp+323454@code.launchpad.net

Description of the change

Redone list interfaces, because sometimes it doesn't show all

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'gufw/gufw/model/ufw_backend.py'
2--- gufw/gufw/model/ufw_backend.py 2016-11-08 19:33:57 +0000
3+++ gufw/gufw/model/ufw_backend.py 2017-05-01 09:37:36 +0000
4@@ -458,16 +458,14 @@
5 return result # cmd | ufw result
6
7 def get_net_interfaces(self):
8- cmd_ifaces = ['netstat', '-i']
9+ cmd_ifaces = ['ls', '/sys/class/net']
10 cmd = self._run_cmd(cmd_ifaces)
11 ifaces = cmd.split('\n')
12
13- index = 0
14 result = []
15 for iface in ifaces:
16- index = index + 1
17- if index > 2 and iface:
18- result.append(iface.split(' ')[0])
19+ if iface:
20+ result.append(iface)
21
22 return result
23
24
25=== modified file 'po/gufw.pot'
26--- po/gufw.pot 2017-05-01 09:11:43 +0000
27+++ po/gufw.pot 2017-05-01 09:37:36 +0000
28@@ -8,7 +8,7 @@
29 msgstr ""
30 "Project-Id-Version: PACKAGE VERSION\n"
31 "Report-Msgid-Bugs-To: \n"
32-"POT-Creation-Date: 2017-05-01 11:10+0200\n"
33+"POT-Creation-Date: 2017-05-01 11:35+0200\n"
34 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
35 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
36 "Language-Team: LANGUAGE <LL@li.org>\n"

Subscribers

People subscribed via source and target branches

to all changes: