\r
def get_account_meta(self, account):\r
""" returns a dictionary with the container metadata """\r
- logging.info("get_account_meta: %s %s", account)\r
+ logging.info("get_account_meta: %s", account)\r
fullname = '/'.join([self.basepath, account])\r
if not os.path.exists(fullname):\r
raise NameError('Account does not exist')\r
contents = os.listdir(fullname) \r
count = len(contents)\r
size = sum(os.path.getsize('/'.join([self.basepath, account, objectname])) for objectname in contents)\r
- return {'name': name, 'count': count, 'bytes': size}\r
+ return {'name': account, 'count': count, 'bytes': size}\r
\r
def create_container(self, account, name):\r
""" creates a new container with the given name\r
if it doesn't exists under the basepath """\r
- logging.debug("create_container: %s %s", account, name)\r
+ logging.info("create_container: %s %s", account, name)\r
fullname = '/'.join([self.basepath, account, name]) \r
if not os.path.exists(fullname):\r
- os.chdir(self.basepath)\r
- os.mkdir(name)\r
+ os.makedirs(fullname)\r
else:\r
raise NameError('Container already exists')\r
return\r