-
Notifications
You must be signed in to change notification settings - Fork 13
Open
Description
I was wondering whether the following change would cause any issues:
diff --git a/solvertools/wordlist.py b/solvertools/wordlist.py
index 757abc7..f4e34b7 100644
--- a/solvertools/wordlist.py
+++ b/solvertools/wordlist.py
@@ -423,7 +423,7 @@ class Wordlist:
return "Wordlist(%r)" % self.name
def _open_mmap(self, path):
- openfile = open(path, "r+b")
+ openfile = open(path, "rb")
mm = mmap.mmap(openfile.fileno(), 0, access=mmap.ACCESS_READ)
return mmI noticed the addition of + causes permission issues if solvertools was installed with sudo or similar, since in that case an ordinary user doesn't expect to have write permissions to the wordlist file.
So far on my system changing the r+b to rb doesn't seem to have caused any issues as far as I can tell, but I figured I should double check if I'm missing anything. If not, I would be happy to open a one-line PR to change this.
Metadata
Metadata
Assignees
Labels
No labels