Skip to content

Commit abfd76c

Browse files
committed
remove uneeded logic from put_file and get_file
1 parent fe1064b commit abfd76c

1 file changed

Lines changed: 4 additions & 12 deletions

File tree

nxc/protocols/smb.py

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1256,12 +1256,8 @@ def put_file_single(self, src, dst):
12561256
self.logger.fail(f"Error writing file to share {self.args.share}: {e}")
12571257

12581258
def put_file(self):
1259-
files = self.args.put_file
1260-
if isinstance(files, list):
1261-
for src, dest in files:
1262-
self.put_file_single(src, dest)
1263-
else:
1264-
self.put_file_single(*files)
1259+
for src, dest in self.args.put_file:
1260+
self.put_file_single(src, dest)
12651261

12661262
def get_file_single(self, remote_path, download_path):
12671263
share_name = self.args.share
@@ -1278,12 +1274,8 @@ def get_file_single(self, remote_path, download_path):
12781274
os.remove(download_path)
12791275

12801276
def get_file(self):
1281-
files = self.args.get_file
1282-
if isinstance(files, list):
1283-
for src, dest in files:
1284-
self.get_file_single(src, dest)
1285-
else:
1286-
self.get_file_single(*files)
1277+
for src, dest in self.args.get_file:
1278+
self.get_file_single(src, dest)
12871279

12881280
def enable_remoteops(self):
12891281
try:

0 commit comments

Comments
 (0)