diff --git a/README.md b/README.md index 9dc7748..61df27d 100644 --- a/README.md +++ b/README.md @@ -173,6 +173,7 @@ Apps & Tools shipped with WordOps : - [ClamAV](https://github.com/Cisco-Talos/clamav-devel) - [cheat.sh](https://github.com/chubin/cheat.sh) - [ProFTPd](https://github.com/proftpd/proftpd) +- [nginx-ultimate-bad-bot-blocker](https://github.com/mitchellkrogza/nginx-ultimate-bad-bot-blocker/) Cache Plugins supported by WordOps : diff --git a/wo/core/fileutils.py b/wo/core/fileutils.py index 94a70a0..87a3da6 100644 --- a/wo/core/fileutils.py +++ b/wo/core/fileutils.py @@ -280,15 +280,15 @@ class WOFileUtils(): """ Searches for string in file and returns True or False. """ - if os.path.isfile(fnm): + if os.path.isfile('{0}'.format(fnm)): try: Log.debug(self, "Finding string {0} to file {1}" .format(sstr, fnm)) - for line in open(fnm, encoding='utf-8'): - if sstr in line: - return True - return False - except OSError as e: + for line in open(fnm, encoding='utf-8'): + if sstr in line: + return True + return False + except OSError as e: Log.debug(self, "{0}".format(e.strerror)) Log.error(self, "Unable to Search string {0} in {1}" .format(sstr, fnm))