You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 mm
I 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.
The text was updated successfully, but these errors were encountered:
I was wondering whether the following change would cause any issues:
I 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.
The text was updated successfully, but these errors were encountered: