Previous 199869 Revisions Next

r36274 Thursday 5th March, 2015 at 23:08:01 UTC by Mike Naberezny
Send error messages to stderr instead of stdout. (nw)
[src/build]file2str.py makelist.py
[src/emu/cpu/h8]h8make.py
[src/regtests/chdman]chdtest.py

trunk/src/build/file2str.py
r244785r244786
2626try:
2727    myfile = open(srcfile, 'rb')
2828except IOError:
29    print("Unable to open source file '%s'" % srcfile)
29    sys.stderr.write("Unable to open source file '%s'\n" % srcfile)
3030    sys.exit(-1)
3131
3232byteCount = os.path.getsize(srcfile)
r244785r244786
5656    dst.write('\n};\n')
5757    dst.close()
5858except IOError:
59    print("Unable to open output file '%s'" % dstfile)
59    sys.stderr.write("Unable to open output file '%s'\n" % dstfile)
6060    sys.exit(-1)
trunk/src/build/makelist.py
r244785r244786
1010    try:
1111        fp = open(srcfile, 'rb')
1212    except IOError:
13        print("Unable to open source file '%s'" % srcfile)
13        sys.stderr.write("Unable to open source file '%s'\n" % srcfile)
1414        return 1
1515    in_comment = 0
1616    linenum = 0
trunk/src/emu/cpu/h8/h8make.py
r244785r244786
1515        return 2
1616    if name == "s26":
1717        return 3
18    print "Unknown chip type name %s" % name
18    sys.stderr.write("Unknown chip type name %s\n" % name)
1919    sys.exit(1)
2020
2121def type_to_device(dtype):
r244785r244786
9696        if val in self.d:
9797            h = self.d[val]
9898            if h.premask != premask:
99                print "Premask conflict"
99                sys.stderr.write("Premask conflict\n")
100100                sys.exit(1)
101101            return h
102102        h = Hash(premask)
r244785r244786
105105   
106106    def set(self, val, opc):
107107        if val in self.d:
108            print "Collision on %s" % opc.description()
108            sys.stderr.write("Collision on %s\n" % opc.description())
109109            sys.exit(1)
110110        self.d[val] = opc
111111
r244785r244786
331331                    if v in h.d:
332332                        d = h.d[v]
333333                        if not d.is_dispatch():
334                            print "Collision on %s" % opc.description()
334                            sys.stderr.write("Collision on %s\n" % opc.description())
335335                            sys.exit(1)
336336                        if opc.enabled:
337337                            d.enabled = True
trunk/src/regtests/chdman/chdtest.py
r244785r244786
121121   chdmanBin = os.path.normpath(os.path.join(currentDirectory, "..", "..", "..", "chdman"))
122122
123123if not os.path.exists(chdmanBin):
124   print chdmanBin + " does not exist"
124   sys.stderr.write(chdmanBin + " does not exist\n")
125125   sys.exit(1)
126126
127127if not os.path.exists(inputPath):
128   print inputPath + " does not exist"
128   sys.stderr.write(inputPath + " does not exist\n")
129129   sys.exit(1)
130130   
131131if not os.path.exists(outputPath):
132   print outputPath + " does not exist"
132   sys.stderr.write(outputPath + " does not exist\n")
133133   sys.exit(1)
134134
135135if os.path.exists(tempPath):   


Previous 199869 Revisions Next


© 1997-2024 The MAME Team