summaryrefslogtreecommitdiff
path: root/tools/regression/xsl_reports/utils/rename.py
blob: 95fb36ff48fc996c82b3a927c8c237c1161858ca (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17

# Copyright (c) MetaCommunications, Inc. 2003-2007
#
# Distributed under the Boost Software License, Version 1.0. 
# (See accompanying file LICENSE_1_0.txt or copy at 
# http://www.boost.org/LICENSE_1_0.txt)

import os.path
import os


def rename( log, src, dst ):
    log( 'Renaming %s to %s' % ( src, dst ) )
    if os.path.exists( dst ):
        os.unlink( dst )

    os.rename( src, dst )