Skip to content

Commit

Permalink
added try/except
Browse files Browse the repository at this point in the history
  • Loading branch information
maikito26 committed Oct 24, 2015
1 parent 2cfa412 commit fbec545
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
2 changes: 1 addition & 1 deletion addon.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addon id="plugin.video.surveillanceroom" name="Surveillance Room" version="1.0.4" provider-name="Maikito26">
<addon id="plugin.video.surveillanceroom" name="Surveillance Room" version="1.0.5" provider-name="Maikito26">
<requires>
<import addon="xbmc.python" version="2.19.0"/>
<import addon="script.module.requests" version="2.3.0" optional="false"/>
Expand Down
5 changes: 5 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
v1.0.5 (Oct 24 2015)
--------------------
Fixed Issues:
- Previous fix didn't work. Using try/except.

v1.0.4 (Oct 24 2015)
--------------------
Fixed Issues:
Expand Down
7 changes: 5 additions & 2 deletions resources/lib/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,17 +86,20 @@ def remove_cached_art(art):
db.execute("SELECT cachedurl FROM texture WHERE url = '%s';" %art)
data = db.fetchone()

if data[0]:
try:

log(4, 'Removing Cached Art :: SQL Output: %s' %data[0])
file_to_delete = os.path.join(_tbn_path, data[0])
log(4, 'Removing Cached Art :: File to be removed: %s' %file_to_delete)

xbmcvfs.delete(file_to_delete)
db.execute("DELETE FROM texture WHERE url = '%s';" %art)

except:
pass

except lite.Error, e:
print "Error %s:" % e.args[0]
log(3, "Error %s:" %e.args[0])
#sys.exit(1)

finally:
Expand Down

0 comments on commit fbec545

Please sign in to comment.