Skip to content

Commit 8e1efb0

Browse files
committed
fixed dropbox
1 parent 54a86bd commit 8e1efb0

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

.vscode/settings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
2-
"python.pythonPath": "C:\\Users\\Federico\\.conda\\envs\\dev\\python.exe",
2+
"python.pythonPath": "/Users/federicoclaudi/miniconda3/envs/dev/bin/python",
33
"cSpell.enabled": true
44
}

proj/utils/dropbox.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,6 @@ def __init__(self):
3636

3737
# keep ref to path where db app is stored locally
3838
self.local = Path(db_app)
39-
if not self.local.exists():
40-
raise FileNotFoundError("Local path not found")
4139

4240
def _fix_path(self, path):
4341
return str(self.local / path)
@@ -65,7 +63,7 @@ def download_file(self, filepath, dest_path=None):
6563

6664
def upload_file(self, source, dest):
6765
try:
68-
with open(self._fix_path(source), "rb") as f:
66+
with open(source, "rb") as f:
6967
self.db.files_upload(
7068
f.read(),
7169
self._check_path(dest),

workspace.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
from proj.utils.dropbox import DropBoxUtils
2+
3+
dbx = DropBoxUtils()
4+
5+
dbx.upload_file("winstor.py", "winstor.py")

0 commit comments

Comments
 (0)