summaryrefslogtreecommitdiff
path: root/ci/appveyor-download.py
diff options
context:
space:
mode:
Diffstat (limited to 'ci/appveyor-download.py')
-rwxr-xr-xci/appveyor-download.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/ci/appveyor-download.py b/ci/appveyor-download.py
index 3160d2e..c6fb081 100755
--- a/ci/appveyor-download.py
+++ b/ci/appveyor-download.py
@@ -10,9 +10,10 @@ from __future__ import unicode_literals
import argparse
import os
-import requests
import zipfile
+import requests
+
def make_auth_headers():
"""Make the authentication headers needed to use the Appveyor API."""
@@ -64,7 +65,7 @@ def download_latest_artifacts(account_project, build_id):
def ensure_dirs(filename):
"""Make sure the directories exist for `filename`."""
- dirname, _ = os.path.split(filename)
+ dirname = os.path.dirname(filename)
if dirname and not os.path.exists(dirname):
os.makedirs(dirname)
@@ -90,6 +91,7 @@ def unpack_zipfile(filename):
ensure_dirs(name)
z.extract(name)
+
parser = argparse.ArgumentParser(description='Download artifacts from AppVeyor.')
parser.add_argument('--id',
metavar='PROJECT_ID',