]> asedeno.scripts.mit.edu Git - git-svn-keywords.git/commitdiff
Deal gracefully with invalid values for lastref from state
authorAlejandro R. Sedeño <asedeno@mit.edu>
Thu, 11 Feb 2010 15:42:36 +0000 (10:42 -0500)
committerAlejandro R. Sedeño <asedeno@mit.edu>
Thu, 11 Feb 2010 15:42:36 +0000 (10:42 -0500)
git-svn-keywords.py

index 761b10883e10c0b4d4368edb6af4f1145748c471..3567c5848205479bd5d4fd78d98a172848d5bb4a 100755 (executable)
@@ -117,7 +117,10 @@ def parse_svn_unhandled(g):
     if ver == VERSION:
         FILES.read(FILES_PATH)
         if CONFIG.has_option('core', 'lastrev'):
-            lastrev = CONFIG.getint('core', 'lastrev')
+            try:
+                lastrev = CONFIG.getint('core', 'lastrev')
+            except ValueError:
+                lastrev = None
 
     _do_parse_unhandled(os.path.join(g.path, 'svn'), lastrev=lastrev)