diff options
Diffstat (limited to 'src/msec/libmsec.py')
-rwxr-xr-x | src/msec/libmsec.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/msec/libmsec.py b/src/msec/libmsec.py index f8a296a..bf6a242 100755 --- a/src/msec/libmsec.py +++ b/src/msec/libmsec.py @@ -123,7 +123,7 @@ class Log: self.syslog_h.setFormatter(formatter) self.logger.addHandler(self.syslog_h) except: - print("Logging to syslog not available: %s" % (sys.exc_value[1]), file=sys.stderr) + print("Logging to syslog not available: %s" % (sys.exc_info()[1]), file=sys.stderr) interactive = True # log to file @@ -134,7 +134,7 @@ class Log: self.file_h.setFormatter(formatter) self.logger.addHandler(self.file_h) except: - print("Logging to '%s' not available: %s" % (self.log_path, sys.exc_value[1]), file=sys.stderr) + print("Logging to '%s' not available: %s" % (self.log_path, sys.exc_info()[1]), file=sys.stderr) interactive = True # interactive logging @@ -312,7 +312,7 @@ class ConfigFile: else: self.lines = [] if file: - self.lines = string.split(file.read(), "\n") + self.lines = file.read().split("\n") file.close() return self.lines @@ -848,7 +848,7 @@ class PERMS: regexp = None for line in file.readlines(): - fields = string.split(line) + fields = line.split() if fields[2] in non_localfs: if regexp: regexp = regexp + '|' + fields[1] |