Revision c6ea94ac

b/kamaki/cli/commands/pithos.py
1021 1021
                                'Invalid range %s' % newvalue, details=[
1022 1022
                                'Valid range formats',
1023 1023
                                '  START-END', '  UP_TO', '  -FROM',
1024
                                'where all values are integers'])
1024
                                'where all values are integers',
1025
                                'OR a compination (csv), e.g.,',
1026
                                '  %s=5,10-20,-5' % self.lvalue])
1025 1027
                        self._value += '%s-%s' % (start, end)
1026 1028
                    else:
1027 1029
                        self._value += '-%s' % int(end)
......
1034 1036
    """Fetch remote file contents"""
1035 1037

  
1036 1038
    arguments = dict(
1037
        range=RangeArgument('show range of data', '--range'),
1039
        range=RangeArgument('show range of data e.g., 5,10-20,-5', '--range'),
1038 1040
        if_match=ValueArgument('show output if ETags match', '--if-match'),
1039 1041
        if_none_match=ValueArgument(
1040 1042
            'show output if ETags match', '--if-none-match'),
......
1051 1053
    @errors.pithos.container
1052 1054
    @errors.pithos.object_path
1053 1055
    def _run(self):
1054
        self.client.download_object(
1056
        r = self.client.download_object(
1055 1057
            self.path, self._out,
1056 1058
            range_str=self['range'],
1057 1059
            version=self['object_version'],
......
1059 1061
            if_none_match=self['if_none_match'],
1060 1062
            if_modified_since=self['if_modified_since'],
1061 1063
            if_unmodified_since=self['if_unmodified_since'])
1064
        print r
1062 1065

  
1063 1066
    def main(self, path_or_url):
1064 1067
        super(self.__class__, self)._run(path_or_url)
......
1073 1076
        resume=FlagArgument(
1074 1077
            'Resume/Overwrite (attempt resume, else overwrite)',
1075 1078
            ('-f', '--resume')),
1076
        range=RangeArgument('Download only that range of data', '--range'),
1079
        range=RangeArgument(
1080
            'Download only that range of data e.g., 5,10-20,-5', '--range'),
1077 1081
        matching_etag=ValueArgument('download iff ETag match', '--if-match'),
1078 1082
        non_matching_etag=ValueArgument(
1079 1083
            'download iff ETags DO NOT match', '--if-none-match'),

Also available in: Unified diff