Skip to content

Commit

Permalink
New Version 1.6.1
Browse files Browse the repository at this point in the history
- B #5 export with python 3
  • Loading branch information
OllisGit committed Oct 7, 2020
1 parent c384326 commit d53d796
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
10 changes: 7 additions & 3 deletions octoprint_filamentmanager/api/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -323,9 +323,13 @@ def export_data(self):
archive_name = "filament_export_{timestamp}.zip".format(timestamp=timestamp)

def file_generator():
with open(archive_path) as f:
for c in f:
yield c
with open(archive_path, "rb") as f:
while True:
chunk = f.read()
if chunk:
yield(chunk)
else:
break
try:
os.remove(archive_path)
except Exception as e:
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
plugin_identifier = "filamentmanager"
plugin_package = "octoprint_filamentmanager"
plugin_name = "OctoPrint-FilamentManager"
plugin_version = "1.6.0"
plugin_version = "1.6.1"
plugin_description = "Manage your spools and keep track of remaining filament on them"
plugin_author = "Sven Lohrmann, Olli"
plugin_author_email = "[email protected], [email protected]"
Expand Down

0 comments on commit d53d796

Please sign in to comment.