diff --git a/lbrynet/lbrynet_daemon/LBRYDaemonServer.py b/lbrynet/lbrynet_daemon/LBRYDaemonServer.py index 76af569c1..7fb6b0519 100644 --- a/lbrynet/lbrynet_daemon/LBRYDaemonServer.py +++ b/lbrynet/lbrynet_daemon/LBRYDaemonServer.py @@ -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)