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
eca67b59
Commit
eca67b59
authored
Jul 2, 2015
by
Fernando
Committed by
fernandog
Jul 2, 2015
Browse files
Options
Downloads
Patches
Plain Diff
Add exception handling to sql commands
parent
9751bae8
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/tv.py
+58
-57
58 additions, 57 deletions
sickbeard/tv.py
with
58 additions
and
57 deletions
sickbeard/tv.py
+
58
−
57
View file @
eca67b59
...
@@ -460,11 +460,9 @@ class TVShow(object):
...
@@ -460,11 +460,9 @@ class TVShow(object):
except
:
except
:
logger
.
log
(
str
(
self
.
indexerid
)
+
"
: Could not refresh subtitles
"
,
logger
.
ERROR
)
logger
.
log
(
str
(
self
.
indexerid
)
+
"
: Could not refresh subtitles
"
,
logger
.
ERROR
)
logger
.
log
(
traceback
.
format_exc
(),
logger
.
DEBUG
)
logger
.
log
(
traceback
.
format_exc
(),
logger
.
DEBUG
)
try
:
sql_l
.
append
(
curEpisode
.
get_sql
())
sql_l
.
append
(
curEpisode
.
get_sql
())
except
Exception
as
e
:
logger
.
log
(
u
"
%s: Error loading file %s. Error: %s
"
%
(
self
.
indexerid
,
mediaFiles
,
e
),
logger
.
ERROR
)
if
len
(
sql_l
)
>
0
:
if
len
(
sql_l
)
>
0
:
myDB
=
db
.
DBConnection
()
myDB
=
db
.
DBConnection
()
...
@@ -2001,7 +1999,7 @@ class TVEpisode(object):
...
@@ -2001,7 +1999,7 @@ class TVEpisode(object):
forceSave: If True it will create SQL queue even if no data has been changed since the
forceSave: If True it will create SQL queue even if no data has been changed since the
last save (aka if the record is not dirty).
last save (aka if the record is not dirty).
"""
"""
try
:
if
not
self
.
dirty
and
not
forceSave
:
if
not
self
.
dirty
and
not
forceSave
:
logger
.
log
(
str
(
self
.
show
.
indexerid
)
+
u
"
: Not creating SQL queue - record is not dirty
"
,
logger
.
DEBUG
)
logger
.
log
(
str
(
self
.
show
.
indexerid
)
+
u
"
: Not creating SQL queue - record is not dirty
"
,
logger
.
DEBUG
)
return
return
...
@@ -2055,6 +2053,9 @@ class TVEpisode(object):
...
@@ -2055,6 +2053,9 @@ class TVEpisode(object):
self
.
airdate
.
toordinal
(),
self
.
hasnfo
,
self
.
hastbn
,
self
.
status
,
self
.
location
,
self
.
file_size
,
self
.
airdate
.
toordinal
(),
self
.
hasnfo
,
self
.
hastbn
,
self
.
status
,
self
.
location
,
self
.
file_size
,
self
.
release_name
,
self
.
is_proper
,
self
.
show
.
indexerid
,
self
.
season
,
self
.
episode
,
self
.
release_name
,
self
.
is_proper
,
self
.
show
.
indexerid
,
self
.
season
,
self
.
episode
,
self
.
absolute_number
,
self
.
version
,
self
.
release_group
]]
self
.
absolute_number
,
self
.
version
,
self
.
release_group
]]
except
Exception
as
e
:
logger
.
log
(
u
"
Error while updating database: %s
"
%
(
repr
(
e
)),
logger
.
ERROR
)
def
saveToDB
(
self
,
forceSave
=
False
):
def
saveToDB
(
self
,
forceSave
=
False
):
"""
"""
...
...
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