opendreambox / enigma2-plugins

Python plug-ins for enigma2 (DreamOS)
https://dreambox.de/
Other
37 stars 49 forks source link

long lasting typos in zapsta(s)tistic #12

Closed MASHtm closed 5 years ago

MASHtm commented 6 years ago

There are three typos in zapstatistic:

--- plugin.py.orig
+++ plugin.py
@@ -85,7 +85,7 @@

 class ZapStatistic:
    def __init__(self):
-       self.xmlFile = "/etc/zapstastistic.xml"
+       self.xmlFile = "/etc/zapstatistic.xml"
        self.zapEntries = []
        self.currentEntry = None

@@ -106,12 +106,12 @@
                print "[ZapStatistic] Error while reading xml file"

    def saveZapEntries(self):
-       xml = '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>\n<zapstastistic>\n'
+       xml = '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>\n<zapstatistic>\n'
        for x in self.zapEntries:
            if not x.end:
                x.end = time()
            xml += '\t<entry ref="%s" begin="%s" end ="%s" />\n' % (decode_charset(deformXml(x.ref), "UTF-8"), str(x.begin), str(x.end))
-       xml += '</zapstastistic>'
+       xml += '</zapstatistic>'
        try:
            f = open(self.xmlFile, "w")
            f.write(xml.encode("UTF-8"))