summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhil Dibowitz <phil@ipom.com>2014-03-19 14:45:47 -0700
committerPhil Dibowitz <phil@ipom.com>2014-03-19 14:45:47 -0700
commit059753ac7d6d69b1c39db68c71c07fcdb94fff41 (patch)
tree69c2e23e6e0d2f1d4169a993b17b095031a105ba
parent3135ba1335005e1ce37e76cadd1ef049eb3895d7 (diff)
parent9178a817781ece8082e5143ecd71848ae316649e (diff)
downloadchef-059753ac7d6d69b1c39db68c71c07fcdb94fff41.tar.gz
Merge pull request #1319 from jaymzh/fix-cache-bugs-10
[10-stable] Fix crashes on invalid cache files
-rw-r--r--CHANGELOG.md1
-rw-r--r--CONTRIBUTIONS.md1
-rw-r--r--chef/lib/chef/checksum_cache.rb2
3 files changed, 3 insertions, 1 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 8c0721bce7..e90b4506de 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -3,6 +3,7 @@
## Unreleased
* Service Provider for MacOSX now supports `enable` and `disable`
+* Chef now gracefully handles corrupted cache files.
## Last Release: 10.30.4 (02/18/2014)
diff --git a/CONTRIBUTIONS.md b/CONTRIBUTIONS.md
index e70fe35c31..d0b917eef7 100644
--- a/CONTRIBUTIONS.md
+++ b/CONTRIBUTIONS.md
@@ -7,3 +7,4 @@ Example Contribution:
# Chef Client 10.x Contributions:
* **jaymzh**: Service Provider for MacOSX now supports `enable` and `disable`
+* **jaymzh**: Chef now gracefully handles corrupted cache files.
diff --git a/chef/lib/chef/checksum_cache.rb b/chef/lib/chef/checksum_cache.rb
index 6db7115a56..9ccfdb64ed 100644
--- a/chef/lib/chef/checksum_cache.rb
+++ b/chef/lib/chef/checksum_cache.rb
@@ -149,7 +149,7 @@ class Chef
def fetch(key)
@moneta.fetch(key)
- rescue ArgumentError => e
+ rescue ArgumentError, TypeError => e
Log.warn "Error loading cached checksum for key #{key.inspect}"
Log.warn(e)
repair_checksum_cache