From 41a1e0ea5abbd5248e7f4853cd7a83a39c62939e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Louis=20V=C3=A9zina?= <5130500+morpheus65535@users.noreply.github.com> Date: Wed, 22 Nov 2017 06:37:17 -0500 Subject: [PATCH] Test --- check_update.py | 5 ++++- list_subtitles.py | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/check_update.py b/check_update.py index 441a1e7cb..a7a75836b 100644 --- a/check_update.py +++ b/check_update.py @@ -28,6 +28,7 @@ def check_and_apply_update(repo=local_repo, remote_name='origin'): repo.head.set_target(remote_id) result = 'Bazarr updated to latest version and restarting.' os.execlp('python', 'python', os.path.join(os.path.dirname(__file__), 'bazarr.py')) + # We can just do it normally elif merge_result & pygit2.GIT_MERGE_ANALYSIS_NORMAL: repo.merge(remote_id) print repo.index.conflicts @@ -43,7 +44,9 @@ def check_and_apply_update(repo=local_repo, remote_name='origin'): [repo.head.target, remote_id]) repo.state_cleanup() result = 'Conflict detected when trying to update.' + os.execlp('python', 'python', os.path.join(os.path.dirname(__file__), 'bazarr.py')) + # We can't do it else: - raise AssertionError('Unknown merge analysis result') + result = 'Bazarr cannot be updated: Unknown merge analysis result' return result diff --git a/list_subtitles.py b/list_subtitles.py index 35c4e8f7b..e5c20d2d0 100644 --- a/list_subtitles.py +++ b/list_subtitles.py @@ -118,7 +118,7 @@ def series_scan_subtitles(no): c_db.close() for episode in episodes: - store_subtitles(path_replace(episode[0].encode('utf-8'))) + store_subtitles(path_replace(episode[0])) list_missing_subtitles(no)