]> www.wagner.pp.ru Git - oss/ljdump.git/commitdiff
Accepted patch from Carl Johan Crafoord <mail@carljohancrafoord.se>
authorSean M. Graham <grahams@milgrim.local>
Sun, 1 Feb 2009 05:13:51 +0000 (00:13 -0500)
committerSean M. Graham <grahams@milgrim.local>
Sun, 1 Feb 2009 05:13:51 +0000 (00:13 -0500)
    - Removed unused "entryLimit" default value, since it was always
      overridden by the required cli argument.
    - Removed condition where the last few entries wouldn't be written out
      to disk.

convertdump.py

index 106b274d796e8d918882249d95f4b2ea2de18686..a81b596a22b505f78f2e2e5db0fe28a36e444225 100755 (executable)
@@ -169,7 +169,6 @@ def main(argv):
     ljElement = outDoc.createElement("livejournal")
     outDoc.appendChild(ljElement)
 
-    entryLimit = 250
     currentFileEntry = 0
 
     # start processing entries
@@ -178,7 +177,7 @@ def main(argv):
 
         currentFileEntry += 1
 
-        if( currentFileEntry == entryLimit ):
+        if( currentFileEntry == entryLimit or entry == entryArray[-1] ):
 
             f = open("%s - %s.xml" % (username, entry), "w")
             tempXML = outDoc.toxml("UTF-8")