Private GIT
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
SickRage
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
vlbox
SickRage
Commits
6b37d023
Commit
6b37d023
authored
10 years ago
by
Dustyn Gibson
Browse files
Options
Downloads
Patches
Plain Diff
Warn on 404, not exception in Trakt - Fixes SiCKRAGETV/sickrage-issues#2072
parent
f7d43b41
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
lib/trakt/trakt.py
+5
-2
5 additions, 2 deletions
lib/trakt/trakt.py
with
5 additions
and
2 deletions
lib/trakt/trakt.py
+
5
−
2
View file @
6b37d023
...
@@ -95,11 +95,11 @@ class TraktAPI():
...
@@ -95,11 +95,11 @@ class TraktAPI():
# This is pretty much a fatal error if there is no status_code
# This is pretty much a fatal error if there is no status_code
# It means there basically was no response at all
# It means there basically was no response at all
raise
traktException
(
e
)
raise
traktException
(
e
)
elif
code
==
502
:
elif
code
is
502
:
# Retry the request, cloudflare had a proxying issue
# Retry the request, cloudflare had a proxying issue
logger
.
log
(
u
'
Retrying trakt api request: %s
'
%
path
,
logger
.
WARNING
)
logger
.
log
(
u
'
Retrying trakt api request: %s
'
%
path
,
logger
.
WARNING
)
return
self
.
traktRequest
(
path
,
data
,
headers
,
url
,
method
)
return
self
.
traktRequest
(
path
,
data
,
headers
,
url
,
method
)
elif
code
==
401
:
elif
code
is
401
:
logger
.
log
(
u
'
Unauthorized. Please check your Trakt settings
'
,
logger
.
WARNING
)
logger
.
log
(
u
'
Unauthorized. Please check your Trakt settings
'
,
logger
.
WARNING
)
if
self
.
traktToken
(
refresh
=
True
,
count
=
count
):
if
self
.
traktToken
(
refresh
=
True
,
count
=
count
):
return
self
.
traktRequest
(
path
,
data
,
headers
,
url
,
method
)
return
self
.
traktRequest
(
path
,
data
,
headers
,
url
,
method
)
...
@@ -108,6 +108,9 @@ class TraktAPI():
...
@@ -108,6 +108,9 @@ class TraktAPI():
#http://docs.trakt.apiary.io/#introduction/status-codes
#http://docs.trakt.apiary.io/#introduction/status-codes
logger
.
log
(
u
'
Trakt may have some issues and it
\'
s unavailable. Try again later please
'
,
logger
.
WARNING
)
logger
.
log
(
u
'
Trakt may have some issues and it
\'
s unavailable. Try again later please
'
,
logger
.
WARNING
)
return
{}
return
{}
elif
code
is
404
:
logger
.
log
(
u
'
Trakt error (404) the resource does not exist: %s
'
%
url
+
path
,
logger
.
WARNING
)
return
{}
else
:
else
:
raise
traktException
(
e
)
raise
traktException
(
e
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment