chore: remove unreachable code (#8464)

This commit is contained in:
Robert Sparks 2025-01-24 10:30:02 -06:00 committed by GitHub
parent d202ebbb91
commit ac88f73439
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -738,15 +738,10 @@ def handle_upload_file(file, filename, meeting, subdir, request=None, encoding=N
This function takes a _binary mode_ file object, a filename and a meeting object and subdir as string.
It saves the file to the appropriate directory, get_materials_path() + subdir.
If the file is a zip file, it creates a new directory in 'slides', which is the basename of the
zip file and unzips the file in the new directory.
"""
filename = Path(filename)
is_zipfile = filename.suffix == '.zip'
path = Path(meeting.get_materials_path()) / subdir
if is_zipfile:
path = path / filename.stem
path.mkdir(parents=True, exist_ok=True)
# agendas and minutes can only have one file instance so delete file if it already exists
@ -799,10 +794,6 @@ def handle_upload_file(file, filename, meeting, subdir, request=None, encoding=N
for chunk in chunks:
destination.write(chunk)
# unzip zipfile
if is_zipfile:
subprocess.call(['unzip', filename], cwd=path)
return None
def new_doc_for_session(type_id, session):