throwing a WindowsError with the code

This commit is contained in:
Julian David Rath 2016-04-12 08:53:04 +02:00
parent 7cbefa4317
commit 6c01453fd3
1 changed files with 1 additions and 3 deletions

View File

@ -54,6 +54,4 @@ def send2trash(path):
fileop.lpszProgressTitle = None fileop.lpszProgressTitle = None
result = SHFileOperationW(byref(fileop)) result = SHFileOperationW(byref(fileop))
if result: if result:
msg = "Couldn't perform operation. Error code: %d" % result raise WindowsError(None, None, path, result)
raise OSError(msg)