Changeset 2768

Show
Ignore:
Timestamp:
02/20/18 05:51:53 (7 months ago)
Author:
jwoithe
Message:

SConstruct: explicitly convert check_output() results to strings.

Under python3, check_output() returns bytes rather than strings. To permit
certain string operations on the result, explicitly convert this to a string
using decode().

This may address some issues encountered when using scons3 with python3.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/libffado/SConstruct

    r2767 r2768  
    157157def ConfigGuess( context ): 
    158158    context.Message( "Trying to find the system triple: " ) 
    159     ret = check_output(("/bin/sh", "admin/config.guess")).rstrip() 
     159    ret = check_output(("/bin/sh", "admin/config.guess")).decode().rstrip() 
    160160    context.Result( ret ) 
    161161    return ret 
     
    713713        # presumably if a person is running this script, they should have 
    714714        # a gcc toolchain installed... 
    715         x = check_output(('objdump', '-Wi', real_exe)) 
     715        x = check_output(('objdump', '-Wi', real_exe)).decode() 
    716716        # should emit a line that looks like this: 
    717717        # /bin/mount:     file format elf32-i386 
     
    855855 
    856856try: 
    857     env['REVISION'] = check_output(('svnversion', '.',)).rstrip() 
     857    env['REVISION'] = check_output(('svnversion', '.',)).decode().rstrip() 
    858858except: 
    859859    env['REVISION'] = ''