Remove import-froms for pathlib.
This commit is contained in:
parent
015e5a2773
commit
132342e4f6
1 changed files with 3 additions and 3 deletions
|
@ -3,7 +3,7 @@ import re
|
||||||
import json
|
import json
|
||||||
import logging
|
import logging
|
||||||
import secrets
|
import secrets
|
||||||
from pathlib import Path
|
import pathlib
|
||||||
import hashlib
|
import hashlib
|
||||||
from Crypto.Cipher import AES
|
from Crypto.Cipher import AES
|
||||||
from Crypto.PublicKey import RSA
|
from Crypto.PublicKey import RSA
|
||||||
|
@ -350,7 +350,7 @@ class Mega:
|
||||||
files = self.get_files()
|
files = self.get_files()
|
||||||
if handle:
|
if handle:
|
||||||
return files[handle]
|
return files[handle]
|
||||||
path = Path(filename)
|
path = pathlib.Path(filename)
|
||||||
filename = path.name
|
filename = path.name
|
||||||
parent_dir_name = path.parent.name
|
parent_dir_name = path.parent.name
|
||||||
for file in list(files.items()):
|
for file in list(files.items()):
|
||||||
|
@ -801,7 +801,7 @@ class Mega:
|
||||||
file_mac[0] ^ file_mac[1], file_mac[2] ^ file_mac[3]
|
file_mac[0] ^ file_mac[1], file_mac[2] ^ file_mac[3]
|
||||||
) != meta_mac:
|
) != meta_mac:
|
||||||
raise ValueError('Mismatched mac')
|
raise ValueError('Mismatched mac')
|
||||||
output_path = Path(dest_path + file_name)
|
output_path = pathlib.Path(dest_path + file_name)
|
||||||
shutil.move(temp_output_file.name, output_path)
|
shutil.move(temp_output_file.name, output_path)
|
||||||
return output_path
|
return output_path
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue