Skip to content

Commit

Permalink
try/except to keep it from crashing
Browse files Browse the repository at this point in the history
  • Loading branch information
amet committed May 24, 2012
1 parent f08dc8d commit b6bede7
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions script.xbmc.subtitles/resources/lib/utilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,11 +167,13 @@ def unpause():
xbmc.Player().pause()

def rem_files(directory):
if xbmcvfs.exists(directory):
shutil.rmtree(directory)
xbmcvfs.mkdir(directory)

try:
if xbmcvfs.exists(directory):
shutil.rmtree(directory)
except:
pass

xbmcvfs.mkdir(directory)

def copy_files( subtitle_file, file_path ):
subtitle_set = False
Expand Down

0 comments on commit b6bede7

Please sign in to comment.