Commit 20925de4 authored by Julien Muchembled's avatar Julien Muchembled

download: drop 'mode' option

parent 051d8f09
......@@ -354,12 +354,6 @@ URL as long as it's the last version, and this version is then moved to a
permanent place when a newer version is released: `url` shall be the final URL
and `alternate-url` the temporary one.
option: mode
------------
Octal (e.g. 644 for rw-r--r--), this option
allows to set mode of the downloaded file.
option: shared
--------------
......
......@@ -26,7 +26,7 @@
##############################################################################
import errno
import os
from zc.buildout import download
from zc.buildout import download, UserError
from . import Shared
class Recipe(object):
......@@ -38,11 +38,10 @@ class Recipe(object):
self._url = options['url']
self._alternate = options.get('alternate-url')
self._md5sum = options.get('md5sum') or None
self._name = name
mode = options.get('mode')
if mode is not None:
mode = int(mode, 8)
self._mode = mode
# 'mode' option was dropped; don't reimplement it
# an 'executable' boolean option may be acceptable
if 'mode' in options:
raise UserError("option 'mode' not supported")
shared = Shared(buildout, name, options)
if not self._md5sum:
......@@ -77,8 +76,6 @@ class Recipe(object):
download.Download(self._buildout, hash_name=True)(
self._url, self._md5sum, self._destination,
**({'alternate_url': alternate} if alternate else {}))
if self._mode is not None:
os.chmod(self._destination, self._mode)
def update(self):
if not self._md5sum:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment