Skip to content

Commit 9a39a07

Browse files
committed
fix: ruff lint fixes
1 parent 6584260 commit 9a39a07

2 files changed

Lines changed: 4 additions & 6 deletions

File tree

nxc/modules/spider_plus.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -325,9 +325,8 @@ def parse_file(self, share_name, file_path, file_info):
325325
self.save_file(remote_file, share_name)
326326
remote_file.close()
327327
download_success = True
328-
except SessionError as e:
329-
if "STATUS_SHARING_VIOLATION" in str(e):
330-
pass
328+
except SessionError:
329+
pass
331330
except Exception as e:
332331
self.logger.fail(f'Failed to download file "{file_path}". Error: {e!s}')
333332

nxc/protocols/smb/smbspider.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -214,9 +214,8 @@ def search_content(self, path, result):
214214
rfile.close()
215215
return
216216

217-
except SessionError as e:
218-
if "STATUS_SHARING_VIOLATION" in str(e):
219-
pass
217+
except SessionError:
218+
pass
220219

221220
except Exception:
222221
traceback.print_exc()

0 commit comments

Comments
 (0)