Changeset 184

Show
Ignore:
Timestamp:
02/12/07 15:29:04 (6 years ago)
Author:
grig
Message:

Some modifications related to running cheesecake_index on Windows.
- 'permission denied' error when removing log file; ignore the exception
- use '/' and not os.sep when figuring out unpack directory name from tar file

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/cheesecake/cheesecake_index.py

    r176 r184  
    14021402 
    14031403        if remove_log_file and not self.keep_log: 
    1404             log_path = os.path.join(self.sandbox, self.logfile) 
     1404            #log_path = os.path.join(self.sandbox, self.logfile) 
     1405            log_path = self.logfile 
    14051406            if os.path.exists(log_path): 
    1406                 os.unlink(log_path) 
     1407                try: 
     1408                    os.unlink(log_path) 
     1409                except OSError, e: 
     1410                    # TODO 
     1411                    # need to figure out how to properly delete log on Windows 
     1412                    # print e 
     1413                    pass 
    14071414 
    14081415    def configure_logging(self, logfile=None): 
  • trunk/cheesecake/util.py

    r175 r184  
    186186 
    187187    tarinfo = t.members[0] 
    188     return tarinfo.name.split(os.sep)[0] 
     188    ## GG: os.sep is \\ when running cheesecake on Windows 
     189    ## while inside the tar.gz the separator is / 
     190    ## We use / because most tar.gz archives are created on *nix 
     191    ##return tarinfo.name.split(os.sep)[0] 
     192    return tarinfo.name.split('/')[0] 
    189193 
    190194def unegg_package(package, destination):