a bit of code cleanup

This commit is contained in:
Timothy Baldridge 2020-05-21 22:21:32 -06:00
parent 51d62067d0
commit 8c4a1dd125
3 changed files with 5 additions and 5 deletions

View File

@ -102,7 +102,7 @@ namespace Wabbajack.Lib.Downloaders
TOP:
if (!response.IsSuccessStatusCode)
throw new HttpException((int)response.StatusCode, response.ReasonPhrase);
return false;
Stream stream;
try

View File

@ -54,7 +54,7 @@ namespace Wabbajack.BuildServer.Test
[Fact]
public async Task CanValidateModLists()
{
var modlists = await MakeModList("can_validate_file.txt");
var modlists = await MakeModList("CanValidateModlistsFile.txt");
Consts.ModlistMetadataURL = modlists.ToString();
Utils.Log("Updating modlists");
await RevalidateLists(true);
@ -68,7 +68,7 @@ namespace Wabbajack.BuildServer.Test
await CheckListFeeds(0, 1);
Utils.Log("Break List");
var archive = "can_validate_file.txt".RelativeTo(Fixture.ServerPublicFolder);
var archive = "CanValidateModlistsFile.txt".RelativeTo(Fixture.ServerPublicFolder);
await archive.MoveToAsync(archive.WithExtension(new Extension(".moved")), true);
// We can revalidate but the non-nexus archives won't be checked yet since the list didn't change

View File

@ -139,14 +139,14 @@ namespace Wabbajack.Server.Services
if (!(archive.State is IUpgradingState))
{
_logger.Log(LogLevel.Information, $"Cannot heal {archive.State} because it's not a healable state");
_logger.Log(LogLevel.Information, $"Cannot heal {archive.State.PrimaryKeyString} because it's not a healable state");
return (archive, ArchiveStatus.InValid);
}
var srcDownload = await _sql.GetArchiveDownload(archive.State.PrimaryKeyString, archive.Hash, archive.Size);
if (srcDownload == null || srcDownload.IsFailed == true)
{
_logger.Log(LogLevel.Information, $"Cannot heal {archive.State} because it hasn't been previously successfully downloaded");
_logger.Log(LogLevel.Information, $"Cannot heal {archive.State.PrimaryKeyString} because it hasn't been previously successfully downloaded");
return (archive, ArchiveStatus.InValid);
}