equal
deleted
inserted
replaced
92 dirs = os.environ.get('YML_PATH', '.').split(':') |
92 dirs = os.environ.get('YML_PATH', '.').split(':') |
93 backend.includePath.extend(dirs) |
93 backend.includePath.extend(dirs) |
94 |
94 |
95 if options.xml2yml: |
95 if options.xml2yml: |
96 for directory in backend.includePath: |
96 for directory in backend.includePath: |
97 try: |
97 name = os.path.join(directory, "xml2yml.ysl2") |
98 name = directory + "/xml2yml.ysl2" |
98 if os.path.isfile(name): |
99 f = open(name, "r") |
99 options.yslt = name |
100 f.close() |
100 options.xml = True |
101 break |
101 break |
102 except: |
102 else: |
103 pass |
103 sys.stderr.write("Error: Stylesheet xml2yml.ysl2 required for --xml2yml not found\n") |
104 |
104 sys.stderr.write("Please check your YML_PATH\n") |
105 options.yslt = name |
105 sys.exit(1) |
106 options.xml = True |
|
107 |
106 |
108 if (options.xslt and options.yslt) or (options.xslt and options.xpath) or (options.yslt and options.xpath): |
107 if (options.xslt and options.yslt) or (options.xslt and options.xpath) or (options.yslt and options.xpath): |
109 sys.stderr.write("Cannot combine --xpath, --xslt and --yslt params\n") |
108 sys.stderr.write("Cannot combine --xpath, --xslt and --yslt params\n") |
110 sys.exit(1) |
109 sys.exit(1) |
111 |
110 |