summaryrefslogtreecommitdiffstats
path: root/fedora-easy-karma.py
diff options
context:
space:
mode:
Diffstat (limited to 'fedora-easy-karma.py')
-rwxr-xr-xfedora-easy-karma.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/fedora-easy-karma.py b/fedora-easy-karma.py
index a0fa84c..64045fe 100755
--- a/fedora-easy-karma.py
+++ b/fedora-easy-karma.py
@@ -294,9 +294,13 @@ class FedoraEasyKarma(object):
cachefile_name = os.path.join(self.options.bodhi_cachedir, "bodhi-cache-%s.cpickle" % release)
if self.options.bodhi_cached:
self.debug("reading bodhi cache")
- cachefile = open(cachefile_name, "rb")
- testing_updates = pickle.load(cachefile)
- cachefile.close()
+ try:
+ cachefile = open(cachefile_name, "rb")
+ testing_updates = pickle.load(cachefile)
+ cachefile.close()
+ except IOError, ioe:
+ print "Cannot access bodhi cache file: %s" % cachefile_name
+ sys.exit(ioe.errno)
else:
self.info("Getting list of packages in updates-testing...")
self.debug("starting bodhi query")