mirror of
https://github.com/simonmicro/Pritunl-Fake-API.git
synced 2025-12-06 02:56:59 -05:00
Do not write if not needed
This commit is contained in:
parent
abb00d3b74
commit
715b0b576e
@ -55,9 +55,9 @@ def doTheReplace(fromApiStr, toApiStr, fromAuthStr, toAuthStr):
|
||||
newLines = newLines.replace(base64.b64encode(f'https://{fromApiStr}/subscription'.encode()).decode(), base64.b64encode(f'https://{toApiStr}/subscription'.encode()).decode())
|
||||
if newLines != lines:
|
||||
numFiles += 1
|
||||
fh = open(os.path.join(p, ff), 'w')
|
||||
fh.writelines(newLines)
|
||||
fh.close()
|
||||
fh = open(os.path.join(p, ff), 'w')
|
||||
fh.writelines(newLines)
|
||||
fh.close()
|
||||
except UnicodeDecodeError:
|
||||
# Brrr - binary files...
|
||||
pass
|
||||
|
||||
Loading…
Reference in New Issue
Block a user