def get_cache_mtime():
 if os.path.exists(APT_UPDATE_SUCCESS_STAMP_PATH):
  return os.stat(APT_UPDATE_SUCCESS_STAMP_PATH).st_mtime
 elif os.path.exists(APT_LISTS_PATH):
  return os.stat(APT_LISTS_PATH).st_mtime
 else:
  return 0

def get_cache_mtime ( ) : if os . path . exists ( APT_UPDATE_SUCCESS_STAMP_PATH ) : return os . stat ( APT_UPDATE_SUCCESS_STAMP_PATH ) . st_mtime elif os . path . exists ( APT_LISTS_PATH ) : return os . stat ( APT_LISTS_PATH ) . st_mtime else : return 0
return mtime of a valid apt cache file .