mirror of
https://github.com/sherlock-project/sherlock
synced 2025-02-17 13:08:27 +00:00
Add @sdushantha suggestion in creating directory.
This commit is contained in:
parent
f48a2980f5
commit
1101af8132
1 changed files with 2 additions and 6 deletions
|
@ -620,12 +620,8 @@ def main():
|
|||
result_file = args.output
|
||||
elif args.folderoutput:
|
||||
# The usernames results should be stored in a targeted folder.
|
||||
# If the folder doesnt exist, create it first
|
||||
try:
|
||||
os.mkdir(args.folderoutput)
|
||||
except FileExistsError:
|
||||
#directory already exists
|
||||
pass
|
||||
# If the folder doesn't exist, create it first
|
||||
os.makedirs(args.folderoutput, exist_ok=True)
|
||||
result_file = os.path.join(args.folderoutput, f"{username}.txt")
|
||||
else:
|
||||
result_file = f"{username}.txt"
|
||||
|
|
Loading…
Add table
Reference in a new issue