Updated some CDN urls

This commit is contained in:
Fergal Moran
2015-07-30 22:06:43 +01:00
parent 71fa592f4b
commit c636c4afa2
5 changed files with 42 additions and 12 deletions

View File

@@ -48,6 +48,7 @@ def set_azure_details(blob_name, download_name):
except Exception, ex:
print "Error processing blob %s: %s" % (download_name, ex.message)
def file_exists(url):
import httplib
from urlparse import urlparse
@@ -57,3 +58,18 @@ def file_exists(url):
r = c.getresponse()
return r.status == 200
def enumerate_objects(container):
blob_service = BlobService(AZURE_ACCOUNT_NAME, AZURE_ACCOUNT_KEY)
blobs = blob_service.list_blobs(container)
items = []
for blob in blobs:
items.append(blob.name)
return items
def delete_object(container, name):
blob_service = BlobService(AZURE_ACCOUNT_NAME, AZURE_ACCOUNT_KEY)
blob_service.delete_blob(container, name)