[virt-tools-list] [virt-bootstrap] [PATCH v6 22/26] Define source code encoding

Cedric Bosdonnat cbosdonnat at suse.com
Sat Aug 19 13:35:14 UTC 2017


On Thu, 2017-08-17 at 10:40 +0100, Radostin Stoyanov wrote:
> The default source code encoding in Python2.* is ASCII (PEP 263 [1])
> and in Python3.* is UTF-8 (PEP 3120 [2]). Define the encoding on top
> of each file for consistency.
> 
> [1] https://www.python.org/dev/peps/pep-0263/
> [2] https://www.python.org/dev/peps/pep-3120/
> ---
>  src/virtBootstrap/__init__.py              | 1 +
>  src/virtBootstrap/progress.py              | 1 +
>  src/virtBootstrap/sources/__init__.py      | 1 +
>  src/virtBootstrap/sources/docker_source.py | 1 +
>  src/virtBootstrap/sources/file_source.py   | 1 +
>  src/virtBootstrap/utils.py                 | 1 +
>  src/virtBootstrap/virt_bootstrap.py        | 1 +
>  7 files changed, 7 insertions(+)
> 
> diff --git a/src/virtBootstrap/__init__.py b/src/virtBootstrap/__init__.py
> index 68bf28f..d5c7651 100644
> --- a/src/virtBootstrap/__init__.py
> +++ b/src/virtBootstrap/__init__.py
> @@ -1,3 +1,4 @@
> +# -*- coding: utf-8 -*-
>  """
>  virt-bootstrap - Is a tool providing an easy way to setup the root file system
>                   for libvirt-based containers.
> diff --git a/src/virtBootstrap/progress.py b/src/virtBootstrap/progress.py
> index 3463168..6734a92 100644
> --- a/src/virtBootstrap/progress.py
> +++ b/src/virtBootstrap/progress.py
> @@ -1,3 +1,4 @@
> +# -*- coding: utf-8 -*-
>  # Authors:
>  #   Cedric Bosdonnat <cbosdonnat at suse.com>
>  #   Radostin Stoyanov <rstoyanov1 at gmail.com>
> diff --git a/src/virtBootstrap/sources/__init__.py b/src/virtBootstrap/sources/__init__.py
> index be6b25c..d858466 100644
> --- a/src/virtBootstrap/sources/__init__.py
> +++ b/src/virtBootstrap/sources/__init__.py
> @@ -1,3 +1,4 @@
> +# -*- coding: utf-8 -*-
>  """
>  sources - Class definitions which process container image or
>            tarball to extract the root file system in destination
> diff --git a/src/virtBootstrap/sources/docker_source.py b/src/virtBootstrap/sources/docker_source.py
> index 502345d..dba0c19 100644
> --- a/src/virtBootstrap/sources/docker_source.py
> +++ b/src/virtBootstrap/sources/docker_source.py
> @@ -1,3 +1,4 @@
> +# -*- coding: utf-8 -*-
>  # Authors: Cedric Bosdonnat <cbosdonnat at suse.com>
>  #
>  # Copyright (C) 2017 SUSE, Inc.
> diff --git a/src/virtBootstrap/sources/file_source.py b/src/virtBootstrap/sources/file_source.py
> index 63dd4d2..44f4fa6 100644
> --- a/src/virtBootstrap/sources/file_source.py
> +++ b/src/virtBootstrap/sources/file_source.py
> @@ -1,3 +1,4 @@
> +# -*- coding: utf-8 -*-
>  # Authors: Cedric Bosdonnat <cbosdonnat at suse.com>
>  #
>  # Copyright (C) 2017 SUSE, Inc.
> diff --git a/src/virtBootstrap/utils.py b/src/virtBootstrap/utils.py
> index 98664ea..508dd04 100644
> --- a/src/virtBootstrap/utils.py
> +++ b/src/virtBootstrap/utils.py
> @@ -1,3 +1,4 @@
> +# -*- coding: utf-8 -*-
>  # Authors:
>  #   Cedric Bosdonnat <cbosdonnat at suse.com>
>  #   Radostin Stoyanov <rstoyanov1 at gmail.com>
> diff --git a/src/virtBootstrap/virt_bootstrap.py b/src/virtBootstrap/virt_bootstrap.py
> index 4be7868..59a340c 100755
> --- a/src/virtBootstrap/virt_bootstrap.py
> +++ b/src/virtBootstrap/virt_bootstrap.py
> @@ -1,4 +1,5 @@
>  #!/usr/bin/env python
> +# -*- coding: utf-8 -*-
>  # Authors: Cedric Bosdonnat <cbosdonnat at suse.com>
>  #
>  # Copyright (C) 2017 SUSE, Inc.

ACK

--
Cedric




More information about the virt-tools-list mailing list