~ubuntu-branches/ubuntu/trusty/swift/trusty-updates

« back to all changes in this revision

Viewing changes to swift/common/wsgi.py

  • Committer: Package Import Robot
  • Author(s): Chuck Short, Soren Hansen, Chuck Short
  • Date: 2012-09-07 19:02:36 UTC
  • mfrom: (1.2.12)
  • Revision ID: package-import@ubuntu.com-20120907190236-fqrmbzm7v6zivs8d
Tags: 1.7.0-0ubuntu1
[ Soren Hansen ]
* Update debian/watch to account for symbolically named tarballs and
  use newer URL.
* Run unit tests at build time.
* Fix Launchpad URLs in debian/watch.

[ Chuck Short ]
* New upstream release
* debian/control: Add pubthon-moc as a build dep
* debian/rules: Dont fail if testsuite fails.

Show diffs side-by-side

added added

removed removed

Lines of Context:
30
30
from webob import Request
31
31
from urllib import unquote
32
32
 
33
 
from swift.common.utils import get_logger, drop_privileges, \
34
 
    validate_configuration, capture_stdio, NullLogger
 
33
from swift.common.utils import capture_stdio, disable_fallocate, \
 
34
    drop_privileges, get_logger, NullLogger, TRUE_VALUES, \
 
35
    validate_configuration
35
36
 
36
37
 
37
38
def monkey_patch_mimetools():
124
125
        logger = get_logger(conf, log_name,
125
126
            log_to_console=kwargs.pop('verbose', False), log_route='wsgi')
126
127
 
 
128
    # disable fallocate if desired
 
129
    if conf.get('disable_fallocate', 'no').lower() in TRUE_VALUES:
 
130
        disable_fallocate()
 
131
 
127
132
    # bind to address and port
128
133
    sock = get_socket(conf, default_port=kwargs.get('default_port', 8080))
129
134
    # remaining tasks should not require elevated privileges