~ubuntu-branches/ubuntu/natty/moin/natty-updates

« back to all changes in this revision

Viewing changes to MoinMoin/script/old/migration/12_to_13_mig01.py

  • Committer: Bazaar Package Importer
  • Author(s): Jonas Smedegaard
  • Date: 2008-06-22 21:17:13 UTC
  • mto: This revision was merged to the branch mainline in revision 18.
  • Revision ID: james.westby@ubuntu.com-20080622211713-inlv5k4eifxckelr
ImportĀ upstreamĀ versionĀ 1.7.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
            c. if you used symlinks in data/text or elsewhere, remove them
19
19
        4. make sure that from_encoding and to_encoding matches your needs (see
20
20
           beginning of script below and config.charset in moin_config.py) and
21
 
           run python 12_to_13_mig1.py from your working dir
 
21
           run python2.3 12_to_13_mig1.py from your working dir
22
22
        5. if there was no error, you will find:
23
23
            data.pre-mig1 (the script renames your data directory copy to that name)
24
24
            data (result, converted to utf-8)
93
93
    print "%s -> %s" % (fname_from, fname_to)
94
94
    file_from = open(fname_from, "rb")
95
95
    if os.path.exists(fname_to):
96
 
        raise Exception("file exists %s" % fname_to)
 
96
        raise "file exists %s" % fname_to
97
97
    file_to = open(fname_to, "wb")
98
98
    for line in file_from:
99
99
        file_to.write(convert_string(line, enc_from, enc_to))