diff options
-rwxr-xr-x | src/msec/libmsec.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/msec/libmsec.py b/src/msec/libmsec.py index bf6a242..95b5060 100755 --- a/src/msec/libmsec.py +++ b/src/msec/libmsec.py @@ -86,7 +86,7 @@ def move(old, new): def substitute_re_result(res, s): for idx in range(0, (res.lastindex or 0) + 1): subst = res.group(idx) or '' - s = string.replace(s, '@' + str(idx), subst) + s = s.replace('@' + str(idx), subst) return s # }}} @@ -378,7 +378,7 @@ class ConfigFile: try: os.unlink(self.path) except: - error('unlink %s: %s' % (self.pathN, str(sys.exc_info()[1]))) + os.error('unlink %s: %s' % (self.pathN, str(sys.exc_info()[1]))) self.log.info(_('deleted %s') % (self.pathN,)) elif self.is_touched: if os.path.exists(self.path): @@ -431,7 +431,7 @@ class ConfigFile: self.log.info(_('moved file %s to %s') % (self.path, self.path + self.suffixN)) self.meta.modified(self.path) elif self.is_modified: - content = string.join(self.lines, "\n") + content = "\n".join(self.lines) dirname = os.path.dirname(self.path) if not os.path.exists(dirname): os.makedirs(dirname) |