Revision 43ee6ae1 kamaki/cli/commands/pithos_cli.py

b/kamaki/cli/commands/pithos_cli.py
98 98
            try:
99 99
                (key, val) = p.split('=')
100 100
            except ValueError as err:
101
                raiseCLIError(err,
102
                    message='Error in --sharing',
101
                raiseCLIError(err, 'Error in --sharing',
103 102
                    details='Incorrect format',
104 103
                    importance=1)
105 104
            if key.lower() not in ('read', 'write'):
106
                raiseCLIError(err, message='Error in --sharing',
105
                raiseCLIError(err, 'Error in --sharing',
107 106
                    details='Invalid permission key %s' % key,
108 107
                    importance=1)
109 108
            val_list = val.split(',')
......
678 677
        except IOError as err:
679 678
            progress_bar.finish()
680 679
            hash_bar.finish()
681
            raiseCLIError(err,
682
                message='Failed to read form file %s' % local_path,
683
                importance=2)
680
            raiseCLIError(err, 'Failed to read form file %s' % local_path, 2)
684 681
        print 'Upload completed'
685 682

  
686 683

  
......
759 756
                else:
760 757
                    out = open(local_path, 'wb+')
761 758
            except IOError as err:
762
                raiseCLIError(err,
763
                    message='Cannot write to file %s' % local_path,
764
                    importance=1)
759
                raiseCLIError(err, 'Cannot write to file %s' % local_path, 1)
765 760
        poolsize = self.get_argument('poolsize')
766 761
        if poolsize is not None:
767 762
            self.client.POOL_SIZE = int(poolsize)
......
937 932
                read = False
938 933
                write = False
939 934
        if not read and not write:
940
            raiseCLIError(None, importance=0,
941
                message='Usage:\tread=<groups,users> write=<groups,users>')
935
            raiseCLIError(None,
936
            'Usage:\tread=<groups,users> write=<groups,users>')
942 937
        return (read, write)
943 938

  
944 939
    def main(self, container___path, *permissions):

Also available in: Unified diff