Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion bugout/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

__email__ = "engineering@bugout.dev"
__license__ = "MIT"
__version__ = "0.2.12"
__version__ = "0.2.13"

__all__ = (
"__author__",
Expand Down
2 changes: 1 addition & 1 deletion bugout/calls.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ def make_request(method: Method, url: str, **kwargs) -> Any:
response.raise_for_status()
except requests.exceptions.RequestException as err:
r = err.response
if not err.response:
if err.response is None:
# Connection errors, timepouts, etc...
raise BugoutResponseException(
"Network error", status_code=599, detail=str(err)
Expand Down
14 changes: 11 additions & 3 deletions bugout/jobs.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,16 @@
from enum import Enum
import json
import os
import requests
import requests # type: ignore
from typing import Callable, Optional, List

from .app import Bugout
from .data import AuthType, BugoutSearchResultWithEntryID
from .data import (
AuthType,
BugoutSearchResultWithEntryID,
BugoutSearchResult,
BugoutSearchResult,
)
from .journal import SearchOrder
from .settings import BUGOUT_BROOD_URL, BUGOUT_SPIRE_URL, REQUESTS_TIMEOUT

Expand Down Expand Up @@ -175,7 +180,10 @@ def list_jobs(

results = [
BugoutSearchResultWithEntryID(
**dict(raw_result), id=raw_result.entry_url.split("/")[-1]
**dict(raw_result),
id=raw_result.entry_url.split("/")[-1]
if isinstance(raw_result, BugoutSearchResult)
else raw_result.entity_url.split("/")[-1],
)
for raw_result in job_results.results
]
Expand Down