From 04a8d78965d14034d4ca0e939ea656fc343281be Mon Sep 17 00:00:00 2001 From: Michael Hanselmann <hansmi@google.com> Date: Mon, 23 Jun 2008 09:52:52 +0000 Subject: [PATCH] utils.WriteFile: Remove optional check_abspath parameter cfgupgrade will not work with relative paths at all, but rather get them from constants.py. Reviewed-by: iustinp --- lib/utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/utils.py b/lib/utils.py index 28c2be828..4e8cfe7e7 100644 --- a/lib/utils.py +++ b/lib/utils.py @@ -960,7 +960,7 @@ def NewUUID(): def WriteFile(file_name, fn=None, data=None, mode=None, uid=-1, gid=-1, atime=None, mtime=None, close=True, - check_abspath=True, dry_run=False, backup=False, + dry_run=False, backup=False, prewrite=None, postwrite=None): """(Over)write a file atomically. @@ -992,7 +992,7 @@ def WriteFile(file_name, fn=None, data=None, None if "close" parameter evaluates to True, otherwise file descriptor. """ - if check_abspath and not os.path.isabs(file_name): + if not os.path.isabs(file_name): raise errors.ProgrammerError("Path passed to WriteFile is not" " absolute: '%s'" % file_name) -- GitLab