Commit 72559663 authored by Seblu's avatar Seblu
Browse files

Fix traceback when packages are not in cache

parent 75d2e21f
...@@ -249,7 +249,7 @@ class VersionController(object): ...@@ -249,7 +249,7 @@ class VersionController(object):
logging.debug("eval_upstream produce version: %s" % v_upstream) logging.debug("eval_upstream produce version: %s" % v_upstream)
# save upstream version # save upstream version
if v_upstream is not None: if v_upstream is not None:
if self.cache["upstream"][name].get("version", None) != v_upstream: if self.cache["upstream"].get(name, {}).get("version", None) != v_upstream:
logging.debug("caching upstream version %s" % v_upstream) logging.debug("caching upstream version %s" % v_upstream)
self.cache["upstream"][name] = {"version": v_upstream, "epoch": int(time())} self.cache["upstream"][name] = {"version": v_upstream, "epoch": int(time())}
else: else:
...@@ -270,7 +270,7 @@ class VersionController(object): ...@@ -270,7 +270,7 @@ class VersionController(object):
logging.debug("eval_downstream produce version: %s" % v_downstream) logging.debug("eval_downstream produce version: %s" % v_downstream)
# save downstream version # save downstream version
if v_downstream is not None: if v_downstream is not None:
if self.cache["downstream"][name].get("version", None) != v_downstream: if self.cache["downstream"].get(name, {}).get("version", None) != v_downstream:
logging.debug("caching downstream version %s" % v_downstream) logging.debug("caching downstream version %s" % v_downstream)
self.cache["downstream"][name] = {"version": v_downstream, "epoch": int(time())} self.cache["downstream"][name] = {"version": v_downstream, "epoch": int(time())}
else: else:
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment