diff options
Diffstat (limited to 'ironic/common/utils.py')
-rw-r--r-- | ironic/common/utils.py | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/ironic/common/utils.py b/ironic/common/utils.py index 51c56c1c0..0bf1be096 100644 --- a/ironic/common/utils.py +++ b/ironic/common/utils.py @@ -135,18 +135,6 @@ def random_alnum(size=32): return ''.join(random.choice(characters) for _ in range(size)) -def delete_if_exists(pathname): - """delete a file, but ignore file not found error.""" - - try: - os.unlink(pathname) - except OSError as e: - if e.errno == errno.ENOENT: - return - else: - raise - - def is_valid_boolstr(val): """Check if the provided string is a valid bool string or not.""" boolstrs = ('true', 'false', 'yes', 'no', 'y', 'n', '1', '0') |