Changeset 3b4265b in osmose-backend


Ignore:
Timestamp:
Apr 22, 2013 10:26:42 PM (7 years ago)
Author:
Jocelyn Jaubert <jocelyn.jaubert@…>
Branches:
master
Children:
7390313
Parents:
4c3cf1c
git-author:
osmose <osmose@…> (22/04/2013 22:19:20)
git-committer:
Jocelyn Jaubert <jocelyn.jaubert@…> (22/04/2013 22:26:42)
Message:

Add min_file_size to module download.py

File:
1 edited

Legend:

Unmodified
Added
Removed
  • modules/download.py

    r21b9daa r3b4265b  
    2727from modules import OsmoseLog 
    2828 
    29 def dl(url, local, logger = OsmoseLog.logger()): 
     29def dl(url, local, logger=OsmoseLog.logger(), min_file_size=10*1024): 
    3030 
    3131    unzip = False 
     
    6565 
    6666    file_size = int(answer.headers.getheader('content-length')) 
    67     if file_size < 10*1024: 
     67    if file_size < min_file_size: 
    6868        # file must be bigger than 100 KB 
    6969        logger.log("File is not big enough: %d B" % file_size) 
Note: See TracChangeset for help on using the changeset viewer.