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

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

 



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@xxxxxxxx>
 #   Radostin Stoyanov <rstoyanov1@xxxxxxxxx>
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@xxxxxxxx>
 #
 # 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@xxxxxxxx>
 #
 # 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@xxxxxxxx>
 #   Radostin Stoyanov <rstoyanov1@xxxxxxxxx>
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@xxxxxxxx>
 #
 # Copyright (C) 2017 SUSE, Inc.
-- 
2.13.5

_______________________________________________
virt-tools-list mailing list
virt-tools-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/virt-tools-list



[Index of Archives]     [Linux Virtualization]     [KVM Development]     [CentOS Virtualization]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]     [Video 4 Linux]

  Powered by Linux