[tor-commits] [lego/master] Fix file location first attempt
hiro at torproject.org
hiro at torproject.org
Mon Sep 2 17:07:53 UTC 2019
commit d75042f47329d0e03735d71d890461c0363e09a5
Author: hiro <hiro at torproject.org>
Date: Mon Sep 2 18:47:00 2019 +0200
Fix file location first attempt
---
packages/xml-to-html/lektor_xml_to_html.py | 3 +++
1 file changed, 3 insertions(+)
diff --git a/packages/xml-to-html/lektor_xml_to_html.py b/packages/xml-to-html/lektor_xml_to_html.py
index 074bb66..b25eb82 100644
--- a/packages/xml-to-html/lektor_xml_to_html.py
+++ b/packages/xml-to-html/lektor_xml_to_html.py
@@ -1,6 +1,7 @@
# -*- coding: utf-8 -*-
#pylint: disable=wrong-import-position
import sys
+import os
PY3 = sys.version_info > (3,)
@@ -13,6 +14,8 @@ webFile = request.urlopen("https://blog.torproject.org/events.xml")
content = webFile.read()
root = etree.fromstring(content)
items = root.findall('channel/item')
+os.chdir(os.path.dirname(__file__))
+print(os.getcwd())
file_object = open('../../../templates/stream.html', 'w')
for entry in items:
title = entry.findtext('title')
More information about the tor-commits
mailing list