lpschedule-generator

libreplanet schedule generator - ricketyspace.net/lpschedule-generator
git clone git://git.ricketyspace.net/lpschedule-generator.git
Log | Files | Refs

commit 7b75bf324ccb583c9df04cbfd0b43b9942dc36eb
parent b6b04b43896ae7c2849c1ec066e908f3e3fe8615
Author: rsiddharth <rsd@gnu.org>
Date:   Sun, 22 Oct 2017 02:00:30 +0000

lps_gen.py: Update print statements.

Use `print` as a function.

* lps_gen.py (read_file, write_file, RenderHTML, main): Update functions.
* lpschedule_generator/_version.py (__version__): Update variable.

Diffstat:
lps_gen.py | 10+++++-----
lpschedule_generator/_version.py | 2+-
2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/lps_gen.py b/lps_gen.py @@ -66,7 +66,7 @@ def read_file(filename): for line in f: content = content + line except IOError: - print "Error: unable to open %s" % filename + print('Error: unable to open {}'.format(filename)) return content @@ -86,7 +86,7 @@ def write_file(filename, filecontent): file_.write(filecontent) file_.close() except IOError: - print "Error creating and writing content to %s" % filename + print('Error creating and writing content to {}'.format(filename)) exit(1) @@ -597,7 +597,7 @@ def RenderHTML(lp_dict, template): try: template = env.get_template(template_name) except TemplateNotFound as e: - print "Template %s not found." % template_name + print('Template {} not found.'.format(template_name)) exit(1) lp_html = template.render(lp_dict=lp_dict) @@ -650,9 +650,9 @@ def main(): if lp_html: # stdout lps html - print lp_html + print(lp_html) else: - print 'Error generating LP HTML.' + print('Error generating LP HTML.') if __name__ == "__main__": diff --git a/lpschedule_generator/_version.py b/lpschedule_generator/_version.py @@ -18,4 +18,4 @@ # along with lpschedule-generator (see COPYING). If not, see # <http://www.gnu.org/licenses/>. -__version__ = u'0.7.1' +__version__ = u'0.8.0.dev1'