forked from LBRYCommunity/lbry-sdk
second shot at pylint error
This commit is contained in:
parent
a9fccfd4ce
commit
46153a8991
1 changed files with 4 additions and 4 deletions
|
@ -383,14 +383,14 @@ class LBRYFileUpload(resource.Resource):
|
||||||
|
|
||||||
# TODO deal with pylint error in cleaner fashion than this
|
# TODO deal with pylint error in cleaner fashion than this
|
||||||
try:
|
try:
|
||||||
excp = WindowsError
|
from exceptions import WindowsError as win_except
|
||||||
except Exception as e:
|
except ImportError as e:
|
||||||
log.error("This shouldn't happen")
|
log.error("This shouldn't happen")
|
||||||
excp = Exception
|
win_except = Exception
|
||||||
|
|
||||||
try:
|
try:
|
||||||
os.remove(uploaded_file.name)
|
os.remove(uploaded_file.name)
|
||||||
except excp as e:
|
except win_except as e:
|
||||||
pass
|
pass
|
||||||
else:
|
else:
|
||||||
shutil.move(uploaded_file.name, newpath)
|
shutil.move(uploaded_file.name, newpath)
|
||||||
|
|
Loading…
Reference in a new issue