Skip to content
This repository has been archived by the owner on Nov 4, 2018. It is now read-only.

Commit

Permalink
* s3cmd: Set 10s socket timeout for read()/write().
Browse files Browse the repository at this point in the history
git-svn-id: https://s3tools.svn.sourceforge.net/svnroot/s3tools/s3cmd/trunk@461 830e0280-6d2a-0410-9c65-932aecc39d9d
  • Loading branch information
mludvig committed Dec 23, 2010
1 parent 1ba1f69 commit 0222ce4
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 2 deletions.
1 change: 1 addition & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
2010-12-24 Michal Ludvig <mludvig@logix.net.nz>

* s3cmd: Set 10s socket timeout for read()/write().
* s3cmd: Added --(no-)check-md5 for [sync].
* run-tests.py, testsuite.tar.gz: Added testsuite for
the above.
Expand Down
1 change: 1 addition & 0 deletions NEWS
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
s3cmd 1.0.0
===========
* [sync] now supports --no-check-md5
* Network connections now have 10s timeout

s3cmd 1.0.0-rc2 - 2010-12-09
===============
Expand Down
3 changes: 2 additions & 1 deletion S3/Config.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,8 @@ class Config(object):
urlencoding_mode = "normal"
log_target_prefix = ""
reduced_redundancy = False
follow_symlinks=False
follow_symlinks = False
socket_timeout = 10

## Creating a singleton
def __new__(self, configfile = None):
Expand Down
6 changes: 5 additions & 1 deletion s3cmd
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import codecs
import locale
import subprocess
import htmlentitydefs
import socket

from copy import copy
from optparse import OptionParser, Option, OptionValueError, IndentedHelpFormatter
Expand Down Expand Up @@ -1906,9 +1907,12 @@ def main():
cfg.include.extend(patterns_list)
cfg.debug_include.update(patterns_textual)

## Process --follow-symlinks
## Process --follow-symlinks
cfg.update_option("follow_symlinks", options.follow_symlinks)

## Set socket read()/write() timeout
socket.setdefaulttimeout(cfg.socket_timeout)

if cfg.encrypt and cfg.gpg_passphrase == "":
error(u"Encryption requested but no passphrase set in config file.")
error(u"Please re-run 's3cmd --configure' and supply it.")
Expand Down

0 comments on commit 0222ce4

Please sign in to comment.