Revision 9d3cd179 kamaki/cli/commands/pithos.py

b/kamaki/cli/commands/pithos.py
1100 1100
                        print('%s is not a regular file' % fpath)
1101 1101
        else:
1102 1102
            if not path.isfile(lpath):
1103
                raiseCLIError(('%s is not  aregular file' % lpath) if (
1103
                raiseCLIError(('%s is not a regular file' % lpath) if (
1104 1104
                    path.exists(lpath)) else '%s does not exist' % lpath)
1105 1105
            try:
1106 1106
                robj = self.client.get_object_info(rpath)
......
2047 2047
    @errors.pithos.connection
2048 2048
    def _run(self):
2049 2049
        accounts = self.client.get_sharing_accounts(marker=self['marker'])
2050
        uuids = [acc['name'] for acc in accounts]
2051
        try:
2052
            astakos_responce = self.auth_base.post_user_catalogs(uuids)
2053
            usernames = astakos_responce.json
2054
            r = usernames['uuid_catalog']
2055
        except Exception as e:
2056
            print 'WARNING: failed to call user_catalogs, %s' % e
2057
            r = dict(sharer_uuid=uuids)
2058
            usernames = accounts
2050 2059
        if self['json_output'] or self['detail']:
2051
            self._print(accounts)
2060
            self._print(usernames)
2052 2061
        else:
2053
            self._print([acc['name'] for acc in accounts])
2062
            self._print(r, print_dict)
2054 2063

  
2055 2064
    def main(self):
2056 2065
        super(self.__class__, self)._run()

Also available in: Unified diff