sivarajankumar / pygr

Automatically exported from code.google.com/p/pygr
0 stars 0 forks source link

pass **kwargs for do_gunzip and run_gunzip (downloader.py) #113

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
there are some inconsistency. do_gunzip and run_gunzip are not getting 
**kwargs, but uncompress_file function definitely pass **kwargs. Thus, 
proposed solution for this is to remove **kwargs or pass **kwargs on 
do_gunzip and run_gunzip. It will be a lot easier in terms of automatic 
checking of compressed files...

def do_gunzip(filepath,newpath=None):
def run_gunzip(filepath,newpath=None):

    elif filepath.endswith('.gz'):
        logger.info('gunzipping %s...' % filepath)
        try:  # could use gzip module, but it's two times slower!!
            return run_gunzip(filepath, **kwargs) # run as sub process
        except OSError: # on Windows, have to run as python module
            return do_gunzip(filepath, **kwargs)

Now, for seqdb downloading, always pass singleFile=True. 

src = SourceURL(newurl, filename = genoname + mytype, singleFile = True)

Original issue reported on code.google.com by deepr...@gmail.com on 4 Sep 2009 at 1:38

GoogleCodeExporter commented 8 years ago

Original comment by mare...@gmail.com on 4 Sep 2009 at 8:42