1
0
mirror of https://github.com/moparisthebest/SickRage synced 2024-11-11 11:55:03 -05:00

Check if list_remote_branches is empty before for-loop

It's causing 'NoneType' object is not iterable when GIT timeout while connection to HTTPS

Discussion here:
https://github.com/SiCKRAGETV/sickrage-issues/issues/307
https://github.com/SiCKRAGETV/sickrage-issues/issues/388
https://github.com/SiCKRAGETV/sickrage-issues/issues/416
This commit is contained in:
Fernando 2015-01-19 09:01:30 -02:00
parent 91cb8d885c
commit aa3f517d9a

View File

@ -550,9 +550,11 @@
<span class="component-title">Branch version:</span> <span class="component-title">Branch version:</span>
<span class="component-desc"> <span class="component-desc">
<select id="branchVersion" class="form-control form-control-inline input-sm pull-left"> <select id="branchVersion" class="form-control form-control-inline input-sm pull-left">
#if $sickbeard.versionCheckScheduler.action.list_remote_branches()
#for $cur_branch in $sickbeard.versionCheckScheduler.action.list_remote_branches(): #for $cur_branch in $sickbeard.versionCheckScheduler.action.list_remote_branches():
<option value="$cur_branch" #if $cur_branch == $sickbeard.BRANCH then 'selected="selected"' else ''#>$cur_branch</option> <option value="$cur_branch" #if $cur_branch == $sickbeard.BRANCH then 'selected="selected"' else ''#>$cur_branch</option>
#end for #end for
#end if
</select> </select>
<input class="btn btn-inline" style="margin-left: 6px;" type="button" id="branchCheckout" value="Checkout Branch"> <input class="btn btn-inline" style="margin-left: 6px;" type="button" id="branchCheckout" value="Checkout Branch">
<div class="clear-left"><p>select branch to use (restart required)</p></div> <div class="clear-left"><p>select branch to use (restart required)</p></div>