Mercurial > parpg-app
comparison parpg.py @ 5:8da675d9f525
parpg.py will create a copy of parpg.cfg.default if that file is
present and it can't find a parpg.cfg file.
author | KarstenBock@gmx.net |
---|---|
date | Thu, 12 Jan 2012 19:57:38 +0100 |
parents | 6ad756581ef1 |
children | 0897c89da4fe |
comparison
equal
deleted
inserted
replaced
4:6ad756581ef1 | 5:8da675d9f525 |
---|---|
34 opts, args = parser.parse_args() | 34 opts, args = parser.parse_args() |
35 | 35 |
36 if not args: | 36 if not args: |
37 if path.isfile("./parpg.cfg"): | 37 if path.isfile("./parpg.cfg"): |
38 args =(".") | 38 args =(".") |
39 elif path.isfile("./parpg.cfg.default"): | |
40 import shutil | |
41 shutil.copyfile("./parpg.cfg.default", "./parpg.cfg") | |
42 args =(".") | |
39 else: | 43 else: |
40 parser.print_help() | 44 parser.print_help() |
41 sys.exit(1) | 45 sys.exit(1) |
42 | 46 |
43 main(args, opts) | 47 main(args, opts) |