From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mail.toke.dk X-Spam-Level: X-Spam-ASN: AS60781 77.235.32.0/19 X-Spam-Status: No, score=-101.9 required=5.0 tests=BAYES_00,SHORTCIRCUIT, URIBL_BLOCKED shortcircuit=ham autolearn=disabled version=3.4.2 Received: from mail.toke.dk by mail.toke.dk with LMTP id 2ASBGtmxzl0L7DYAOr1fkg (envelope-from ) for ; Fri, 15 Nov 2019 15:10:33 +0100 Authentication-Results: mail.toke.dk; none (SPF check N/A for local connections - client-ip=77.235.54.103; helo=web6.sd.eurovps.com; envelope-from=flent-users-bounces@flent.org; receiver=) Authentication-Results: mail.toke.dk; dkim=fail reason="signature verification failed" (1024-bit key) header.d=github.com header.i=@github.com header.b=ouuaYFjG Received: from web6.sd.eurovps.com (web6.sd.eurovps.com [77.235.54.103]) by mail.toke.dk (Postfix) with ESMTPS id 6047F6ABDFD for ; Fri, 15 Nov 2019 15:10:31 +0100 (CET) Received: from [::1] (port=37626 helo=web6.sd.eurovps.com) by web6.sd.eurovps.com with esmtp (Exim 4.92) (envelope-from ) id 1iVcIw-004e7A-UQ; Fri, 15 Nov 2019 16:10:30 +0200 Received: from out-23.smtp.github.com ([192.30.252.206]:37705) by web6.sd.eurovps.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92) (envelope-from ) id 1iVcIq-004e0I-LG for flent-users@flent.org; Fri, 15 Nov 2019 16:10:29 +0200 Received: from github-lowworker-28f8021.ac4-iad.github.net (github-lowworker-28f8021.ac4-iad.github.net [10.52.25.98]) by smtp.github.com (Postfix) with ESMTP id C8B8266091D for ; Fri, 15 Nov 2019 06:09:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=github.com; s=pf2014; t=1573826983; bh=fyKaLouDG2Ijbf9uzT28rI8hP+aZ7tZHNGsPPvDPffU=; h=Date:From:Reply-To:To:Cc:In-Reply-To:References:Subject:List-ID: List-Archive:List-Post:List-Unsubscribe:From; b=ouuaYFjG9mpZr9vDKw0VJmtCtLt3ujvfmWpAVSzn+2NLDoTuu8uChjnOvMhopceQF fD7G9iStWJS9mbG6Oa/JInrfQqFJCsalpNxV/oq5RBaHcYVvnAp6uCkdwzIvLQYeQI tqKdvJ4QX/rWPNQg6YvkY/J4Y6/iH/oCB0JoXHoU= Date: Fri, 15 Nov 2019 06:09:43 -0800 From: =?UTF-8?B?VG9rZSBIw7hpbGFuZC1Kw7hyZ2Vuc2Vu?= To: tohojo/flent Message-ID: In-Reply-To: References: Mime-Version: 1.0 Precedence: list X-GitHub-Sender: tohojo X-GitHub-Recipient: flent-users X-GitHub-Reason: subscribed X-Auto-Response-Suppress: All X-GitHub-Recipient-Address: flent-users@flent.org Subject: Re: [Flent-users] [tohojo/flent] added wifi data function (#188) X-BeenThere: flent-users@flent.org X-Mailman-Version: 2.1.29 List-Id: Flent discussion list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: tohojo/flent Cc: Subscribed Content-Type: multipart/mixed; boundary="===============4233150262909311128==" Errors-To: flent-users-bounces@flent.org Sender: "Flent-users" X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - web6.sd.eurovps.com X-AntiAbuse: Original Domain - toke.dk X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - flent.org X-Get-Message-Sender-Via: web6.sd.eurovps.com: acl_c_authenticated_local_user: mailman/mailman X-Authenticated-Sender: web6.sd.eurovps.com: mailman@flent.org --===============4233150262909311128== Content-Type: multipart/alternative; boundary="--==_mimepart_5dceb1a7b9502_47ce3f83b2ecd9641814577"; charset=UTF-8 Content-Transfer-Encoding: 7bit ----==_mimepart_5dceb1a7b9502_47ce3f83b2ecd9641814577 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit tohojo commented on this pull request. > @@ -514,3 +514,27 @@ def get_module_versions(): module_versions[m] = v return module_versions + +def get_wifi_data(iface): + wifi_data = {} + unwanted_keys = ["Interface", "ifindex", "wdev", "wiphy"] + output = get_command_output("iw dev %s info" % iface) + if output is not None: + for line in output.splitlines(): + parts = line.split() + + if parts[0] in unwanted_keys: + continue + k,v = parts[0], parts[1] + if parts[0] == 'txpower': + v = float(parts[1]) + if parts[0] == 'channel': No, I meant the 'channel' line... -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/tohojo/flent/pull/188#discussion_r346839149 ----==_mimepart_5dceb1a7b9502_47ce3f83b2ecd9641814577 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit

@tohojo commented on this pull request.


In flent/metadata.py:

> @@ -514,3 +514,27 @@ def get_module_versions():
             module_versions[m] = v
 
     return module_versions
+
+def get_wifi_data(iface):
+    wifi_data = {}
+    unwanted_keys = ["Interface", "ifindex", "wdev", "wiphy"]
+    output = get_command_output("iw dev %s info" % iface)
+    if output is not None:
+        for line in output.splitlines():
+            parts = line.split() 
+
+            if parts[0]  in unwanted_keys:
+                continue
+            k,v = parts[0], parts[1]
+            if parts[0] == 'txpower':
+               v = float(parts[1])
+            if parts[0] == 'channel':

No, I meant the 'channel' line...


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.

----==_mimepart_5dceb1a7b9502_47ce3f83b2ecd9641814577-- --===============4233150262909311128== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Flent-users mailing list Flent-users@flent.org http://flent.org/mailman/listinfo/flent-users_flent.org --===============4233150262909311128==--