Changeset 4399

Show
Ignore:
Timestamp:
03/28/09 20:35:54 (4 years ago)
Author:
gpolo
Message:

Check for existance of destination and added a note about a problem not currently handled.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • branch/merger/nt_appdata.py

    r4395 r4399  
    1515        old_path = os.path.join(os.path.expanduser("~"), ".umit") 
    1616        if os.path.exists(old_path): 
    17             shutil.move(old_path, 
    18                     os.path.join(BasePaths.HOME, BasePaths.UMIT_CFG_DIR)) 
     17            try: 
     18                shutil.move(old_path, 
     19                        os.path.join(BasePaths.HOME, BasePaths.UMIT_CFG_DIR)) 
     20            except OSError, err: 
     21                if err.errno == 17: 
     22                    # Destination already exists, need to merge the files 
     23                    # from the old directory to this new one. 
     24                    # XXX 
     25                    return 
     26                raise