You're Invited:Meet the Socket Team at RSAC and BSidesSF 2026, March 23–26.RSVP
Socket
Book a DemoSign in
Socket

blackboardsync

Package Overview
Dependencies
Maintainers
1
Versions
71
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

blackboardsync - pypi Package Compare versions

Comparing version
0.17.0
to
0.17.1rc1
+15
-3
blackboard_sync/content/attachment.py
import uuid
import mimetypes

@@ -18,3 +19,15 @@ from pathlib import Path

job: DownloadJob):
self.filename = attachment.fileName
filename = attachment.fileName or str(uuid.uuid1())
name_ext = '.' + filename.split('.')[-1]
# Guess extension based on content
mime = attachment.mimeType or 'text/plain'
real_ext = mimetypes.guess_extension(mime, strict=False)
possible_ext = mimetypes.guess_all_extensions(mime, strict=False)
if name_ext in possible_ext:
self.filename = filename
else:
self.filename = filename + real_ext
self.stream = job.session.download(attachment_id=attachment.id,

@@ -24,3 +37,2 @@ **api_path)

def write(self, path: Path, executor: ThreadPoolExecutor) -> None:
filename = self.filename or str(uuid.uuid1())
super().write_base(path / filename, executor, self.stream)
super().write_base(path / self.filename, executor, self.stream)
+1
-1

@@ -41,3 +41,3 @@ import logging

self.title = content.title_path_safe
self.title = content.title_path_safe.replace('.', '_')

@@ -44,0 +44,0 @@ try:

@@ -157,4 +157,4 @@ """

self.log_out()
except RequestException:
logger.exception("Network failure")
except (RequestException, OSError):
logger.exception("Download error")
self._has_error = True

@@ -161,0 +161,0 @@

Metadata-Version: 2.1
Name: blackboardsync
Version: 0.17.0
Version: 0.17.1rc1
Summary: Sync your blackboard content to your device

@@ -5,0 +5,0 @@ Author-email: Jacob Sánchez <jacobszpz@protonmail.com>

@@ -9,2 +9,9 @@ # Changelog

### Fixed
- Name conflict between content and attachment
- Handle OSError in download workers
- Folder names should not contain dots
## [0.17.0] - 2024-09-20
### Changed

@@ -11,0 +18,0 @@ - Remove hardcoded minimum year in setup wizard

Metadata-Version: 2.1
Name: blackboardsync
Version: 0.17.0
Version: 0.17.1rc1
Summary: Sync your blackboard content to your device

@@ -5,0 +5,0 @@ Author-email: Jacob Sánchez <jacobszpz@protonmail.com>