[virt-tools-list] [virt-bootstrap] [PATCH v7 22/26] Define source code encoding
Radostin Stoyanov
rstoyanov1 at gmail.com
Sat Aug 26 20:42:11 UTC 2017
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 3500bf1..ef72d64 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 489592c..ac9e4ec 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 8c5436e..2ff1b4b 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.
--
2.13.5
More information about the virt-tools-list
mailing list