Edit:
Ignore this, I figured it out about 3 seconds after posting this but can’t delete it =(
I have this try, except code for working with RackSpace cloudfiles
try:
cacheobject = cachecontainer.get_object('file.jpg')
except NoSuchObject as objectname:
raise tornado.web.HTTPError(404)
If ‘file.jpg’ is not found, the exception ‘NoSuchObject’ is raised. When I run this code I get the error
except NoSuchObject as objectname:
NameError: global name ‘NoSuchObject’ is not defined
I tried putting NoSuchObject in quotes but then I got an error about string exceptions being depreciated.
facepalm
Yeah this programming thing’s only my job, nothing big
I have to use the stupid thingy thing don’t I
I’ll try and not be stupid in future