summaryrefslogtreecommitdiffstats
path: root/lps_gen.py
diff options
context:
space:
mode:
authorrsiddharth <rsd@gnu.org>2017-10-22 02:00:30 +0000
committerrsiddharth <rsd@gnu.org>2017-10-22 02:00:30 +0000
commit7b75bf324ccb583c9df04cbfd0b43b9942dc36eb (patch)
treee24402cdf59eabc0e61c04d50222e58587588f69 /lps_gen.py
parentb6b04b43896ae7c2849c1ec066e908f3e3fe8615 (diff)
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 (limited to 'lps_gen.py')
-rw-r--r--lps_gen.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/lps_gen.py b/lps_gen.py
index e3b77e5..3f30fc3 100644
--- 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__":