Skip to content

Commit 2027b8b

Browse files
committed
see notes 0.2.1 and 0.2.2
1 parent 057bb66 commit 2027b8b

File tree

4 files changed

+46
-3
lines changed

4 files changed

+46
-3
lines changed

README.md

+7
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,13 @@ Client.shell(self)
170170

171171
## CHANGELOG
172172

173+
### 0.2.2
174+
- added error to upload_file to prevent file name in destination path
175+
176+
### 0.2.1
177+
- remove pkg-resources==0.0.0 dependency
178+
- rebuild requirement.txt
179+
173180
### 0.2.0
174181
- dir kwarg renamed to path, moved to the first positional arg in: list_files, list_dirs, list_all
175182
- space_files will populate upon client instance if space_name is supplied.

client.py

+11-1
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,12 @@
5151
"""
5252
)
5353

54+
cant_place_file_name_in_destination = (
55+
"""
56+
You can not place the file name in the destination path.
57+
"""
58+
)
59+
5460
# HELPERS
5561

5662
def file_to_string(file, type):
@@ -268,6 +274,10 @@ def upload_file(self, file, destination="", rename=None, space_name=None ):
268274
"""
269275
self.set_space(space_name)
270276

277+
# Check if destination contains file name
278+
if os.path.basename(destination):
279+
raise Exception('[Raised]' + cant_place_file_name_in_destination)
280+
271281
# Get file name and extentions
272282
basename = os.path.basename(file)
273283
file_ext = ''.join(Path(basename).suffixes)
@@ -314,4 +324,4 @@ def delete_file(self, file_path, yes=False, space_name=None):
314324
if res.get('ResponseMetadata').get('RetryAttempts') == 0:
315325
return True
316326
else:
317-
return res
327+
return res

requirements.txt

+27-1
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,46 @@
11
autopep8==1.5.7
2+
bleach==4.1.0
23
boto3==1.18.41
34
botocore==1.21.41
5+
certifi==2021.5.30
6+
cffi==1.14.6
7+
charset-normalizer==2.0.5
48
click==8.0.1
9+
colorama==0.4.4
10+
cryptography==3.4.8
11+
docutils==0.17.1
512
fernet==1.0.1
13+
idna==3.2
14+
importlib-metadata==4.8.1
15+
jeepney==0.7.1
616
jmespath==0.10.0
17+
keyring==23.2.1
718
mkdir==2020.12.3
819
orderdict==2020.12.3
9-
pkg_resources==0.0.0
20+
packaging==21.0
21+
pkginfo==1.7.1
1022
pyaes==1.6.1
1123
pyaml==21.8.3
1224
pycodestyle==2.7.0
25+
pycparser==2.20
26+
Pygments==2.10.0
27+
pyparsing==2.4.7
1328
python-dateutil==2.8.2
1429
PyYAML==5.4.1
30+
readme-renderer==29.0
31+
requests==2.26.0
32+
requests-toolbelt==0.9.1
33+
rfc3986==1.5.0
1534
s3transfer==0.5.0
35+
SecretStorage==3.3.1
36+
setupcfg==2020.12.3
37+
setuppy-generator==2020.12.2
1638
six==1.16.0
1739
toml==0.10.2
40+
tqdm==4.62.2
41+
twine==3.4.2
1842
urllib3==1.26.6
1943
values==2020.12.3
44+
webencodings==0.5.1
2045
write==2020.12.3
46+
zipp==3.5.0

setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ def parse_requirements(filename):
1919

2020
setup(
2121
name='digital-ocean-spaces',
22-
version='0.2.0',
22+
version='0.2.2',
2323
author='Jody Doolittle <https://chariot-dev.com>',
2424
license='MIT',
2525
url='https://github.com/ChariotDev/digital-ocean-spaces',

0 commit comments

Comments
 (0)