[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] [gnuradio] 02/13: grc: made flow graph python files th
From: |
git |
Subject: |
[Commit-gnuradio] [gnuradio] 02/13: grc: made flow graph python files the UTF-8 they always should have been |
Date: |
Sat, 17 Oct 2015 17:26:53 +0000 (UTC) |
This is an automated email from the git hooks/post-receive script.
jcorgan pushed a commit to branch master
in repository gnuradio.
commit 820bd052810f5fe821f2ceaf70f1cd45451127ed
Author: Marcus Müller <address@hidden>
Date: Wed Oct 14 19:56:36 2015 +0200
grc: made flow graph python files the UTF-8 they always should have been
---
grc/python/Generator.py | 3 ++-
grc/python/flow_graph.tmpl | 1 +
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/grc/python/Generator.py b/grc/python/Generator.py
index d48be2f..d60befe 100644
--- a/grc/python/Generator.py
+++ b/grc/python/Generator.py
@@ -22,6 +22,7 @@ import sys
import subprocess
import tempfile
import shlex
+import codecs
from distutils.spawn import find_executable
from Cheetah.Template import Template
@@ -107,7 +108,7 @@ class TopBlockGenerator(object):
"This is usually undesired. Consider "
"removing the throttle block.")
# generate
- with open(self.get_file_path(), 'w') as fp:
+ with codecs.open(self.get_file_path(), 'w', encoding = 'utf-8') as fp:
fp.write(self._build_python_code_from_template())
try:
os.chmod(self.get_file_path(), self._mode)
diff --git a/grc/python/flow_graph.tmpl b/grc/python/flow_graph.tmpl
index 35d9239..9939006 100644
--- a/grc/python/flow_graph.tmpl
+++ b/grc/python/flow_graph.tmpl
@@ -1,6 +1,7 @@
#if not $generate_options.startswith('hb')
#!/usr/bin/env python2
#end if
+# -*- coding: utf-8 -*-
########################################################
##Cheetah template - gnuradio_python
##
- [Commit-gnuradio] [gnuradio] branch master updated (616fee5 -> 83da789), git, 2015/10/17
- [Commit-gnuradio] [gnuradio] 12/13: Merge remote-tracking branch 'tom/ctrlport_extending0', git, 2015/10/17
- [Commit-gnuradio] [gnuradio] 11/13: Merge remote-tracking branch 'gnuradio-wg-grc/master_grcwg', git, 2015/10/17
- [Commit-gnuradio] [gnuradio] 08/13: uhd: open support for controlport in static builds., git, 2015/10/17
- [Commit-gnuradio] [gnuradio] 01/13: grc: added horizontal mouse wheel scrolling, git, 2015/10/17
- [Commit-gnuradio] [gnuradio] 05/13: ctrlport: fixed copy-paste error for setting short data., git, 2015/10/17
- [Commit-gnuradio] [gnuradio] 09/13: uhd: Adds ControlPort support to USRP source block's command message port., git, 2015/10/17
- [Commit-gnuradio] [gnuradio] 03/13: freq_xlating_fir: added pmt::dict command handling, git, 2015/10/17
- [Commit-gnuradio] [gnuradio] 02/13: grc: made flow graph python files the UTF-8 they always should have been,
git <=
- [Commit-gnuradio] [gnuradio] 13/13: Merge branch 'maint', git, 2015/10/17
- [Commit-gnuradio] [gnuradio] 04/13: ctrlport: blocks: added controlport support to multiply_const_XXX blocks., git, 2015/10/17
- [Commit-gnuradio] [gnuradio] 06/13: ctrlport: blocks: added controlport support to add_const_XX blocks., git, 2015/10/17
- [Commit-gnuradio] [gnuradio] 10/13: ctrlport: adding new examples., git, 2015/10/17
- [Commit-gnuradio] [gnuradio] 07/13: ctrlport: provides a ControlPort model that connects directly with a block's message handler., git, 2015/10/17