def list_packages_from_emzed_store(secret=""): url = global_config.get_url("emzed_store_url") result = defaultdict(list) if not secret: packages = client.list_public_files(url) else: user = global_config.get("emzed_store_user") folder = "/" + secret try: packages = client.list_files(url, user, folder) except requests.HTTPError, e: print e.message print print "MAYBE USER %s IS UNKNOWN OR SECRET '%s' IS INVALID" % (user, secret) print return result
def delete_from_emzed_store(pkg_name, version_string, secret=""): assert_valid_secret(secret) assert version_string, "empty version_string not allowed" user = global_config.get("emzed_store_user") password = global_config.get("emzed_store_password") url = global_config.get_url("emzed_store_url") # + pkg_name + "/" + version_string folder = "/" + secret try: files = client.list_files(url, user, folder) except requests.HTTPError, e: print e.message print print "MAYBE USER %s IS NOT KNOWN OR SECRET %r IS NOT VALID" % (user, secret) print return False
def list_packages_from_emzed_store(secret=""): url = global_config.get_url("emzed_store_url") result = defaultdict(list) if not secret: packages = client.list_public_files(url) else: user = global_config.get("emzed_store_user") folder = "/" + secret try: packages = client.list_files(url, user, folder) except requests.HTTPError, e: print str(e) print print "MAYBE USER %s IS UNKNOWN OR SECRET '%s' IS INVALID" % ( user, secret) print return result
def delete_from_emzed_store(pkg_name, version_string, secret=""): assert_valid_secret(secret) assert version_string, "empty version_string not allowed" user = global_config.get("emzed_store_user") password = global_config.get("emzed_store_password") url = global_config.get_url( "emzed_store_url") # + pkg_name + "/" + version_string folder = "/" + secret try: files = client.list_files(url, user, folder) except requests.HTTPError, e: print str(e) print print "MAYBE USER %s IS NOT KNOWN OR SECRET %r IS NOT VALID" % (user, secret) print return False