[lxc-devel] [lxc/master] mark the python examples as having utf-8 encoding
evgeni on Github
lxc-bot at linuxcontainers.org
Sat Oct 8 16:33:02 UTC 2016
A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 518 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20161008/169f755b/attachment.bin>
-------------- next part --------------
From 59e8ed7637b5bd09c264c4325d7460f88ae4c34c Mon Sep 17 00:00:00 2001
From: Evgeni Golov <evgeni at debian.org>
Date: Sat, 8 Oct 2016 18:29:30 +0200
Subject: [PATCH] mark the python examples as having utf-8 encoding
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
this allows running them also under Python2, which otherwise
would choke on Stéphane's name and error out with
SyntaxError: Non-ASCII character '\xc3' in file …
Signed-off-by: Evgeni Golov <evgeni at debian.org>
---
src/python-lxc/examples/api_test.py | 1 +
src/python-lxc/examples/pyconsole-vte.py | 1 +
src/python-lxc/examples/pyconsole.py | 1 +
3 files changed, 3 insertions(+)
diff --git a/src/python-lxc/examples/api_test.py b/src/python-lxc/examples/api_test.py
index eab4f46..b8b5ee6 100755
--- a/src/python-lxc/examples/api_test.py
+++ b/src/python-lxc/examples/api_test.py
@@ -1,4 +1,5 @@
#!/usr/bin/env python3
+# -*- coding: utf-8 -*-
#
# api_test.py: Test/demo of the python3-lxc API
#
diff --git a/src/python-lxc/examples/pyconsole-vte.py b/src/python-lxc/examples/pyconsole-vte.py
index 8e07f15..8a98359 100755
--- a/src/python-lxc/examples/pyconsole-vte.py
+++ b/src/python-lxc/examples/pyconsole-vte.py
@@ -1,4 +1,5 @@
#!/usr/bin/env python3
+# -*- coding: utf-8 -*-
#
# pyconsole-vte: Example program showing use of console functions
# in the lxc python binding
diff --git a/src/python-lxc/examples/pyconsole.py b/src/python-lxc/examples/pyconsole.py
index a9238a0..2b0cd14 100755
--- a/src/python-lxc/examples/pyconsole.py
+++ b/src/python-lxc/examples/pyconsole.py
@@ -1,4 +1,5 @@
#!/usr/bin/env python3
+# -*- coding: utf-8 -*-
#
# pyconsole: Example program showing use of console functions
# in the lxc python binding
More information about the lxc-devel
mailing list