Private GIT
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
SickRage-1
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-1
Commits
2122b7ca
Commit
2122b7ca
authored
Oct 27, 2015
by
miigotu
Browse files
Options
Downloads
Plain Diff
Merge pull request #2996 from fernandog/log_filter
Fix issue filter - prevent issue SPAM
parents
96892236
08bce5e3
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
sickbeard/logger.py
+14
-3
14 additions, 3 deletions
sickbeard/logger.py
with
14 additions
and
3 deletions
sickbeard/logger.py
+
14
−
3
View file @
2122b7ca
...
@@ -269,18 +269,29 @@ class Logger(object):
...
@@ -269,18 +269,29 @@ class Logger(object):
reports
=
gh
.
get_organization
(
gh_org
).
get_repo
(
gh_repo
).
get_issues
(
state
=
"
all
"
)
reports
=
gh
.
get_organization
(
gh_org
).
get_repo
(
gh_repo
).
get_issues
(
state
=
"
all
"
)
def
is_mako_error
(
title
):
def
is_mako_error
(
title
):
return
re
.
search
(
r
'
Loaded module.*not found in sys\.modules
'
,
title
)
is
not
None
#[APP SUBMITTED]: Loaded module _home_pi_SickRage_gui_slick_views_home_mako not found in sys.modules
#[APP SUBMITTED]: Loaded module _opt_sickbeard_gui_slick_views_home_mako not found in sys.modules
#[APP SUBMITTED]: Loaded module D__TV_SickRage_gui_slick_views_home_mako not found in sys.modules
return
re
.
search
(
r
"
.* Loaded module .* not found in sys\.modules
"
,
title
)
is
not
None
def
is_ascii_error
(
title
):
def
is_ascii_error
(
title
):
return
re
.
search
(
r
"'
.*
'
codec can
'
t encode character .* in position .*:
"
,
title
)
is
not
None
#[APP SUBMITTED]: 'ascii' codec can't encode characters in position 00-00: ordinal not in range(128)
#[APP SUBMITTED]: 'charmap' codec can't decode byte 0x00 in position 00: character maps to <undefined>
return
re
.
search
(
r
"
.* codec can
'
t .*code .* in position .*:
"
,
title
)
is
not
None
def
is_malformed_error
(
title
):
#[APP SUBMITTED]: not well-formed (invalid token): line 0, column 0
re
.
search
(
r
"
.* not well-formed \(invalid token\): line .* column .*
"
,
title
)
is
not
None
mako_error
=
is_mako_error
(
title_Error
)
mako_error
=
is_mako_error
(
title_Error
)
ascii_error
=
is_ascii_error
(
title_Error
)
ascii_error
=
is_ascii_error
(
title_Error
)
malformed_error
=
is_malformed_error
(
title_Error
)
issue_found
=
False
issue_found
=
False
for
report
in
reports
:
for
report
in
reports
:
if
title_Error
.
rsplit
(
'
::
'
)[
-
1
]
in
report
.
title
or
\
if
title_Error
.
rsplit
(
'
::
'
)[
-
1
]
in
report
.
title
or
\
(
mako_error
and
is_mako_error
(
report
.
title
))
or
\
(
mako_error
and
is_mako_error
(
report
.
title
))
or
\
(
malformed_error
and
is_malformed_error
(
report
.
title
))
or
\
(
ascii_error
and
is_ascii_error
(
report
.
title
)):
(
ascii_error
and
is_ascii_error
(
report
.
title
)):
issue_id
=
report
.
number
issue_id
=
report
.
number
...
...
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
sign in
to comment