Skip to content

Instantly share code, notes, and snippets.

@EdLeafe
Created June 21, 2013 20:10
Show Gist options
  • Save EdLeafe/5833971 to your computer and use it in GitHub Desktop.
Save EdLeafe/5833971 to your computer and use it in GitHub Desktop.
In [1]: import pyrax; pyrax.keyring_auth(); cs = pyrax.cloudservers; cf = pyrax.cloudfiles; cdb = pyrax.cloud_databases; dns = pyrax.cloud_dns; clb = pyrax.cloud_loadbalancers; cm=pyrax.cloud_monitoring
In [2]: cf.get_container('bogus')
---------------------------------------------------------------------------
NoSuchContainer Traceback (most recent call last)
<ipython-input-2-eab615a189da> in <module>()
----> 1 cf.get_container('bogus')
/Users/ed/projects/pyrax/pyrax/cf_wrapper/client.pyc in _wrapped(*args, **kwargs)
48 if bad_container:
49 raise exc.NoSuchContainer("Container '%s' doesn't exist" %
---> 50 bad_container.groups()[0])
51 failed_upload = etag_failed_pattern.search(str_error)
52 if failed_upload:
NoSuchContainer: Container 'bogus' doesn't exist
In [3]: cf.get_object("bogus", "bogus")
---------------------------------------------------------------------------
NoSuchContainer Traceback (most recent call last)
<ipython-input-3-46c17694fa35> in <module>()
----> 1 cf.get_object("bogus", "bogus")
/Users/ed/projects/pyrax/pyrax/cf_wrapper/client.pyc in get_object(self, container, obj_name)
429 def get_object(self, container, obj_name):
430 """Returns a StorageObject instance for the object in the container."""
--> 431 cont = self.get_container(container)
432 obj = cont.get_object(self._resolve_name(obj_name))
433 return obj
/Users/ed/projects/pyrax/pyrax/cf_wrapper/client.pyc in _wrapped(*args, **kwargs)
48 if bad_container:
49 raise exc.NoSuchContainer("Container '%s' doesn't exist" %
---> 50 bad_container.groups()[0])
51 failed_upload = etag_failed_pattern.search(str_error)
52 if failed_upload:
NoSuchContainer: Container 'bogus' doesn't exist
In [4]: cf.get_object("actual", "bogus")
---------------------------------------------------------------------------
NoSuchObject Traceback (most recent call last)
<ipython-input-4-54c7594115f7> in <module>()
----> 1 cf.get_object("actual", "bogus")
/Users/ed/projects/pyrax/pyrax/cf_wrapper/client.pyc in get_object(self, container, obj_name)
430 """Returns a StorageObject instance for the object in the container."""
431 cont = self.get_container(container)
--> 432 obj = cont.get_object(self._resolve_name(obj_name))
433 return obj
434
/Users/ed/projects/pyrax/pyrax/cf_wrapper/container.pyc in get_object(self, name)
116 except IndexError:
117 raise exc.NoSuchObject("No object with the name '%s' exists"
--> 118 % name)
119 self._object_cache[name] = ret
120 return ret
NoSuchObject: No object with the name 'bogus' exists
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment