Skip to content

Commit

Permalink
fix upload append (test this)
Browse files Browse the repository at this point in the history
  • Loading branch information
PythonFZ committed Nov 17, 2024
1 parent e68c83f commit 20623b0
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions zndraw/upload.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@ def upload(
typer.echo(f"Uploading to: {url}/token/{vis.token}")

if not append:
size = len(vis)
del vis[: size - 1]
del vis[:]
typer.echo(f"Reading {fileio.name} ...")

generator = get_generator_from_filename(fileio)
Expand All @@ -40,9 +39,6 @@ def upload(
if browser:
webbrowser.open(f"{url}/token/{vis.token}")

if not append:
# There must be a frame otherwise removing everything currently doesn't work
del vis[0]
if len(frames) > 1:
vis.extend(frames[1:])

Expand Down

0 comments on commit 20623b0

Please sign in to comment.