diff options
-rwxr-xr-x | fedora-easy-karma.py | 10 |
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") |