]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
fetch.git: fix a remnant wrt persist + keyerror
authorChristopher Larson <kergoth@gmail.com>
Thu, 7 Apr 2011 03:34:53 +0000 (20:34 -0700)
committerChristopher Larson <kergoth@gmail.com>
Thu, 7 Apr 2011 03:34:53 +0000 (20:34 -0700)
Signed-off-by: Christopher Larson <kergoth@gmail.com>
lib/bb/fetch/git.py

index 9a51ed1387dbe1a9c7cd2f61f63225ddb025d194..49c1cfe8f93cfbf0bcd7fc8d04baf9b02c885415 100644 (file)
@@ -269,9 +269,9 @@ class Git(Fetch):
         oldkey = self.generate_revision_key(url, ud, d, branch=False)
 
         latest_rev = self._build_revision(url, ud, d)
-        last_rev = localcounts[key + '_rev']
+        last_rev = localcounts.get(key + '_rev')
         if last_rev is None:
-            last_rev = localcounts[oldkey + '_rev']
+            last_rev = localcounts.get(oldkey + '_rev')
             if last_rev is not None:
                 del localcounts[oldkey + '_rev']
                 localcounts[key + '_rev'] = last_rev
@@ -281,9 +281,9 @@ class Git(Fetch):
         if uselocalcount:
             count = Fetch.localcount_internal_helper(ud, d)
         if count is None:
-            count = localcounts[key + '_count']
+            count = localcounts.get(key + '_count')
         if count is None:
-            count = localcounts[oldkey + '_count']
+            count = localcounts.get(oldkey + '_count')
             if count is not None:
                 del localcounts[oldkey + '_count']
                 localcounts[key + '_count'] = count