Skip to content

Commit

Permalink
Merge pull request #1478 from clinton-hall/hotfix/submodule
Browse files Browse the repository at this point in the history
Hotfix cleanup for nzbToMedia installed as a git submodule
  • Loading branch information
labrys authored Dec 29, 2018
2 parents c5dad74 + a490595 commit 0f495a2
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 11.8.0
current_version = 11.8.1
commit = True
tag = False

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
nzbToMedia v11.8.0
nzbToMedia v11.8.1
==================

Provides an [efficient](https://github.com/clinton-hall/nzbToMedia/wiki/Efficient-on-demand-post-processing) way to handle postprocessing for [CouchPotatoServer](https://couchpota.to/ "CouchPotatoServer") and [SickBeard](http://sickbeard.com/ "SickBeard") (and its [forks](https://github.com/clinton-hall/nzbToMedia/wiki/Failed-Download-Handling-%28FDH%29#sick-beard-and-its-forks))
Expand Down
4 changes: 4 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
Change_LOG / History

V11.8.1 12/29/2018

Fix cleanup for nzbToMedia installed as a git submodule

V11.8.0 12/28/2018

Add version information
Expand Down
15 changes: 12 additions & 3 deletions cleanup.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,7 @@ def clean_folders(*paths):

def clean(*paths):
"""Clean up bytecode and obsolete folders."""
with WorkingDirectory(module_path()) as cwd:
if cwd.working_directory != cwd.original_directory:
print('Changing to directory:', cwd.working_directory)
def _clean(*paths):
print('\n-- Cleaning bytecode --')
try:
result = clean_bytecode()
Expand All @@ -124,8 +122,19 @@ def clean(*paths):
print(error)
else:
print(result or 'No folders to clean\n')

with WorkingDirectory(module_path()) as cwd:
if cwd.working_directory != cwd.original_directory:
print('Changing to directory:', cwd.working_directory)

if os.path.exists('.git'):
_clean(*paths)
else:
print('Directory is not a git repository')

if cwd.working_directory != cwd.original_directory:
print('Returning to directory: ', cwd.original_directory)

print('\n-- Cleanup finished --\n')


Expand Down
2 changes: 1 addition & 1 deletion core/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
from core.transcoder import transcoder
from core.databases import mainDB

__version__ = '11.8.0'
__version__ = '11.8.1'

# Client Agents
NZB_CLIENTS = ['sabnzbd', 'nzbget', 'manual']
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def read(*names, **kwargs):

setup(
name='nzbToMedia',
version='11.8.0',
version='11.8.1',
license='GPLv3',
description='Efficient on demand post processing',
long_description="""
Expand Down

0 comments on commit 0f495a2

Please sign in to comment.