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 ...@@ -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 permanent place when a newer version is released: `url` shall be the final URL
and `alternate-url` the temporary one. 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 option: shared
-------------- --------------
......
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
############################################################################## ##############################################################################
import errno import errno
import os import os
from zc.buildout import download from zc.buildout import download, UserError
from . import Shared from . import Shared
class Recipe(object): class Recipe(object):
...@@ -38,11 +38,10 @@ class Recipe(object): ...@@ -38,11 +38,10 @@ class Recipe(object):
self._url = options['url'] self._url = options['url']
self._alternate = options.get('alternate-url') self._alternate = options.get('alternate-url')
self._md5sum = options.get('md5sum') or None self._md5sum = options.get('md5sum') or None
self._name = name # 'mode' option was dropped; don't reimplement it
mode = options.get('mode') # an 'executable' boolean option may be acceptable
if mode is not None: if 'mode' in options:
mode = int(mode, 8) raise UserError("option 'mode' not supported")
self._mode = mode
shared = Shared(buildout, name, options) shared = Shared(buildout, name, options)
if not self._md5sum: if not self._md5sum:
...@@ -77,8 +76,6 @@ class Recipe(object): ...@@ -77,8 +76,6 @@ class Recipe(object):
download.Download(self._buildout, hash_name=True)( download.Download(self._buildout, hash_name=True)(
self._url, self._md5sum, self._destination, self._url, self._md5sum, self._destination,
**({'alternate_url': alternate} if alternate else {})) **({'alternate_url': alternate} if alternate else {}))
if self._mode is not None:
os.chmod(self._destination, self._mode)
def update(self): def update(self):
if not self._md5sum: 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