Skip to content

Commit

Permalink
Merge 098bfea into 44318ef
Browse files Browse the repository at this point in the history
  • Loading branch information
akharit committed Aug 6, 2018
2 parents 44318ef + 098bfea commit 242605b
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 8 deletions.
6 changes: 6 additions & 0 deletions HISTORY.rst
Expand Up @@ -3,6 +3,12 @@
Release History
===============

0.0.26 (2018-08-03)
+++++++++++++++++++
* Fixed bug due to not importing errno
* Fixed bug in os.makedirs race condition
* Updated Readme with correct environment variables and fixed some links

0.0.25 (2018-07-26)
+++++++++++++++++++
* Fixed downloading of empty directories and download of directory structure with only a single file
Expand Down
23 changes: 20 additions & 3 deletions README.rst
Expand Up @@ -90,8 +90,25 @@ Usage: Command Line Sample
To interact with the API at a higher-level, you can use the provided
command-line interface in "samples/cli.py". You will need to set
the appropriate environment variables as described above to connect to the
Azure Data Lake Store. Below is a simple sample, with more details beyond.
the appropriate environment variables
* :code:`azure_username`
* :code:`azure_password`
* :code:`azure_data_lake_store_name`
* :code:`azure_subscription_id`
* :code:`azure_resource_group_name`
* :code:`azure_service_principal`
* :code:`azure_service_principal_secret`
to connect to the Azure Data Lake Store. Optionally, you may need to define :code:`azure_tenant_id` or :code:`azure_data_lake_store_url_suffix`.
Below is a simple sample, with more details beyond.
.. code-block:: bash
Expand Down Expand Up @@ -188,7 +205,7 @@ Tests
=====
For detailed documentation about our test framework, please visit the
`tests folder <https://github.com/ro-joowan/azure-data-lake-store-python/tree/master/tests>`__.
`tests folder <https://github.com/Azure/azure-data-lake-store-python/tree/master/tests>`__.
Need Help?
==========
Expand Down
7 changes: 6 additions & 1 deletion azure/datalake/store/multithread.py
Expand Up @@ -20,6 +20,7 @@
import os
import pickle
import time
import errno

from io import open
from .core import AzureDLPath, _fetch_range
Expand Down Expand Up @@ -238,7 +239,11 @@ def touch(self, src, dst):
if not os.path.exists(root) and root:
# don't attempt to create current directory
logger.debug('Creating directory %s', root)
os.makedirs(root)
try:
os.makedirs(root)
except OSError as e:
if e.errno != errno.EEXIST:
raise
logger.debug('Creating empty file %s', dst)
with open(dst, 'wb'):
pass
Expand Down
7 changes: 3 additions & 4 deletions tests/README.md
Expand Up @@ -31,8 +31,7 @@ environment variables should be defined:
* `azure_data_lake_store_name`
* `azure_subscription_id`
* `azure_resource_group_name`
* `azure_service_principal`
* `azure_service_principal_secret`
* `azure_tenant_id`
* `azure_client_id`
* `azure_client_secret`

Optionally, you may need to define `azure_tenant_id` or `azure_url_suffix`.
Optionally, you may need to define `azure_tenant_id` or `azure_data_lake_store_url_suffix`.

0 comments on commit 242605b

Please sign in to comment.