Skip to content

Commit 95ad903

Browse files
committed
Fix create_plugin on Windows
Signed-off-by: Joffrey F <[email protected]>
1 parent 17f41b5 commit 95ad903

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

docker/api/plugin.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,10 @@ def create_plugin(self, name, plugin_data_dir, gzip=False):
4444
"""
4545
url = self._url('/plugins/create')
4646

47-
with utils.create_archive(root=plugin_data_dir, gzip=gzip) as archv:
47+
with utils.create_archive(
48+
root=plugin_data_dir, gzip=gzip,
49+
files=set(utils.build.walk(plugin_data_dir, []))
50+
) as archv:
4851
res = self._post(url, params={'name': name}, data=archv)
4952
self._raise_for_status(res)
5053
return True

tests/integration/api_plugin_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ def test_upgrade_plugin(self):
135135

136136
def test_create_plugin(self):
137137
plugin_data_dir = os.path.join(
138-
os.path.dirname(__file__), 'testdata/dummy-plugin'
138+
os.path.dirname(__file__), os.path.join('testdata', 'dummy-plugin')
139139
)
140140
assert self.client.create_plugin(
141141
'docker-sdk-py/dummy', plugin_data_dir

0 commit comments

Comments
 (0)