Re: [PATCH sandbox-image 4/9] py3: Use 'builtins' instead of '__builtin__'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 2018-04-18 at 21:57 +0100, Radostin Stoyanov wrote:
> In Python3, the __builtin__ module is renamed to builtins.
> 
> https://docs.python.org/3/library/builtins.html#module-builtins
> 
> Signed-off-by: Radostin Stoyanov <rstoyanov1@xxxxxxxxx>
> ---
>  libvirt_sandbox_image/cli.py | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/libvirt_sandbox_image/cli.py b/libvirt_sandbox_image/cli.py
> index 585df96..ec5fd6d 100644
> --- a/libvirt_sandbox_image/cli.py
> +++ b/libvirt_sandbox_image/cli.py
> @@ -50,8 +50,8 @@ try:
>                      localedir="/usr/share/locale",
>                      codeset = 'utf-8')
>  except IOError:
> -    import __builtin__
> -    __builtin__.__dict__['_'] = unicode
> +    import builtins
> +    builtins.__dict__['_'] = str
>  
>  
>  def debug(msg):

ACK
--
Cedric

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux