[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [lego/master] Fix file location first attempt



commit d75042f47329d0e03735d71d890461c0363e09a5
Author: hiro <hiro@xxxxxxxxxxxxxx>
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')



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits