~ubuntu-branches/ubuntu/oneiric/alarm-clock/oneiric

« back to all changes in this revision

Viewing changes to alarm-clock/OldDirCheck.py

  • Committer: Bazaar Package Importer
  • Author(s): Marco Rodrigues
  • Date: 2008-08-17 10:04:12 UTC
  • mfrom: (1.1.5 upstream)
  • Revision ID: james.westby@ubuntu.com-20080817100412-ut3rfm3oa0z354h7
Tags: 0.9.11.2-1
* New upstream version.
* debian/watch:
  + Change .tar.gz to .tar.bz2.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
import os, os.path, shutil
 
2
 
 
3
def OldDirCheck():
 
4
        if not os.path.exists(os.getenv("HOME") + '/.config/Alarm-Clock'):
 
5
                return
 
6
        else:
 
7
                try:
 
8
                        os.mkdir(os.getenv("HOME") + '/.config/alarm-clock')
 
9
                except:
 
10
                        pass
 
11
                
 
12
                for name in os.listdir(os.getenv("HOME") + '/.config/Alarm-Clock'):
 
13
                        shutil.copyfile(os.getenv("HOME") + '/.config/Alarm-Clock/' + name,
 
14
                                                        os.getenv("HOME") + '/.config/alarm-clock/' + name)
 
15
 
 
16
                        os.remove(os.getenv("HOME") + '/.config/Alarm-Clock/' + name)
 
17
 
 
18
                os.rmdir(os.getenv("HOME") + '/.config/Alarm-Clock')