second shot at pylint error

This commit is contained in:
Jack 2016-08-23 02:25:32 -04:00
parent a9fccfd4ce
commit 46153a8991

View file

@ -383,14 +383,14 @@ class LBRYFileUpload(resource.Resource):
# TODO deal with pylint error in cleaner fashion than this
try:
excp = WindowsError
except Exception as e:
from exceptions import WindowsError as win_except
except ImportError as e:
log.error("This shouldn't happen")
excp = Exception
win_except = Exception
try:
os.remove(uploaded_file.name)
except excp as e:
except win_except as e:
pass
else:
shutil.move(uploaded_file.name, newpath)