visualfabriq / bquery

A query and aggregation framework for Bcolz (W2013-01)
https://www.visualfabriq.com
BSD 3-Clause "New" or "Revised" License
56 stars 11 forks source link

Remove unnecesary tmp dir removal #85

Closed jemromerol closed 7 years ago

jemromerol commented 7 years ago

Hi @CarstVaartjes! This patch should fix the error below:

In [142]: ct.cache_factor([column_name], refresh=False)
---------------------------------------------------------------------------
UnboundLocalError                         Traceback (most recent call last)
<ipython-input-142-a4a60c8761ad> in <module>()
----> 1 ct.cache_factor([column_name], refresh=False)

/srv/python/venv/local/lib/python2.7/site-packages/bquery/ctable.pyc in cache_factor(self, col_list, refresh)
    153                 shutil.move(col_values_rootdir_tmp, col_values_rootdir)
    154             else:
--> 155                 rm_file_or_dir(col_factor_rootdir_tmp, ignore_errors=True)
    156 
    157     def unique(self, col_or_col_list):

UnboundLocalError: local variable 'col_factor_rootdir_tmp' referenced before assignment
CarstVaartjes commented 7 years ago

Thanks! will look at it tonight :)