about summary refs log tree commit diff
path: root/zachwalk.py
diff options
context:
space:
mode:
Diffstat (limited to 'zachwalk.py')
-rwxr-xr-xzachwalk.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/zachwalk.py b/zachwalk.py
index 1588449..da03aaf 100755
--- a/zachwalk.py
+++ b/zachwalk.py
@@ -33,6 +33,7 @@ def getnewestdate(url):
     # TODO: something special if status is not 2x
     return gnd(fp)
 def gnd(fp):
+    nd = DEFAULT
     for line in fp:
      if type(line) != str:
        line=line.decode('UTF-8')
@@ -40,15 +41,17 @@ def gnd(fp):
       desc =getdesc(line)
       try:
         date = parse(desc[0:10],fuzzy=True).date()
-        return date
+        if date > nd:
+          nd = date
       except:
         try:
           date = parse(desc,fuzzy=True).date()
-          return date
+          if date > nd:
+            nd = date
         except:
           pass
         pass
-    return DEFAULT
+    return nd
 
 def replaceDateIfNewer(desc, newestdate):
     try: