[Bug 222980] sysutils/battray fails

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Fri Oct 13 14:27:04 UTC 2017


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=222980

            Bug ID: 222980
           Summary: sysutils/battray fails
           Product: Ports & Packages
           Version: Latest
          Hardware: amd64
                OS: Any
            Status: New
          Severity: Affects Many People
          Priority: ---
         Component: Individual Port(s)
          Assignee: tz at freebsd.org
          Reporter: bsd at mkfs.nl
             Flags: maintainer-feedback?(tz at freebsd.org)
          Assignee: tz at freebsd.org

Hello,

battray does not work with python 3 in 11.1-RELEASE:

battray error: a bytes-like object is required, not 'str'  
  File "/usr/local/lib/python3.6/site-packages/battray/__init__.py", line 135,
in update_status                        
    self.data['lifetime']) =  self.platform()                                   
  File "/usr/local/lib/python3.6/site-packages/battray/platforms.py", line 38,
in freebsd                              
    for line in o.split('\n'):

The following patch solves this for me:

--- battray/platforms.py.orig   2017-10-13 15:38:32.473043000 +0200
+++ battray/platforms.py    2017-10-13 15:38:55.984945000 +0200
@@ -35,7 +35,7 @@

    o = subprocess.Popen(['acpiconf', '-i0'],
stdout=subprocess.PIPE).communicate()[0]

-   for line in o.split('\n'):
+   for line in o.decode().split('\n'):
        if line.find(':') == -1:
            continue
        (key, value) = line.split(':', 1)

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-ports-bugs mailing list