Revision e5cd3e33
b/pithos/lib/client.py | ||
---|---|---|
23 | 23 |
def _chunked_transfer(self, path, method='PUT', f=stdin, headers=None, |
24 | 24 |
blocksize=1024): |
25 | 25 |
http = HTTPConnection(self.host) |
26 |
#http = HTTP() |
|
27 |
#http.connect('127.0.0.1', 8000) |
|
28 | 26 |
|
29 | 27 |
# write header |
30 | 28 |
path = '/%s/%s%s' % (self.api, self.account, path) |
b/tools/store | ||
---|---|---|
10 | 10 |
import logging |
11 | 11 |
import types |
12 | 12 |
|
13 |
DEFAULT_HOST = '127.0.0.1:8000'
|
|
13 |
DEFAULT_HOST = 'pithos.dev.grnet.gr'
|
|
14 | 14 |
DEFAULT_API = 'v1' |
15 | 15 |
|
16 | 16 |
_cli_commands = {} |
... | ... | |
400 | 400 |
|
401 | 401 |
cmd = cls(argv[2:]) |
402 | 402 |
|
403 |
cmd.execute(*cmd.args) |
|
404 |
|
|
405 |
#try: |
|
406 |
# cmd.execute(*cmd.args) |
|
407 |
#except TypeError: |
|
408 |
# cmd.parser.usage = '%%prog %s [options] %s' % (name, cmd.syntax) |
|
409 |
# cmd.parser.print_help() |
|
410 |
# exit(1) |
|
411 |
#except Fault, f: |
|
412 |
# print f.data |
|
403 |
try: |
|
404 |
cmd.execute(*cmd.args) |
|
405 |
except TypeError: |
|
406 |
cmd.parser.usage = '%%prog %s [options] %s' % (name, cmd.syntax) |
|
407 |
cmd.parser.print_help() |
|
408 |
exit(1) |
|
409 |
except Fault, f: |
|
410 |
print f.data |
|
413 | 411 |
|
414 | 412 |
if __name__ == '__main__': |
415 | 413 |
main() |
Also available in: Unified diff