Skip to content

Commit

Permalink
v0.0.7
Browse files Browse the repository at this point in the history
Quick fix for queue.txt crash
  • Loading branch information
WhaleJ84 authored Jan 5, 2021
2 parents d42ab6b + a333cad commit 5b9746f
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 3 deletions.
Binary file added dist/hb_organiser-0.0.7-py3-none-any.whl
Binary file not shown.
Binary file added dist/hb_organiser-0.0.7.tar.gz
Binary file not shown.
2 changes: 1 addition & 1 deletion hb_organiser.egg-info/PKG-INFO
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: hb-organiser
Version: 0.0.6
Version: 0.0.7
Summary: Organises Humble Bundle bundles based on their platform.
Home-page: https://github.com/WhaleJ84/hb_organiser
Author: James Whale
Expand Down
16 changes: 15 additions & 1 deletion hb_organiser/organiser.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,21 @@ def copy_file(source, destination, task=None):
:type task: str
:return:
"""
if not isfile(destination) or source in open('queue.txt'):
if not isfile(destination):
# TODO: Fix this duplicate code section.
# Was nastily thrown in to fix a bug
try:
if source in open('queue.txt'):
print(f"{task} COPY: {source} {destination}")
log = open('queue.txt', 'w')
log.write(source)
log.close()
copyfile(source, destination)
log = open('queue.txt', 'w')
log.write('')
log.close()
except FileNotFoundError:
pass
print(f"{task} COPY: {source} {destination}")
log = open('queue.txt', 'w')
log.write(source)
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

setuptools.setup(
name="hb_organiser",
version="0.0.6",
version="0.0.7",
author="James Whale",
author_email="[email protected]",
description="Organises Humble Bundle bundles based on their platform.",
Expand Down

0 comments on commit 5b9746f

Please sign in to comment.