Changeset 14
- Timestamp:
- 10/17/2008 10:28:56 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Tools/ScXML2evt/scxml2evt.py
r6 r14 19 19 from lxml import etree 20 20 except ImportError: 21 print "fatal error: lxml module not found!"21 print >> sys.stderr, "fatal error: lxml module not found!" 22 22 sys.exit(1) 23 23 … … 51 51 x = etree.parse(src, parser) 52 52 except Exception, e: 53 print e53 print >> sys.stderr, e 54 54 sys.exit(3) 55 55 … … 111 111 112 112 # add event info to last pick 113 last = formatted[a["station"]] 113 try: 114 last = formatted[a["station"]] 115 except NameError: 116 # only if no stations left after filtering 117 print >> sys.stderr, "no picks on filtered station list" 118 sys.exit(4) 119 114 120 for e in self.event: 115 121 try: … … 140 146 # no picks found 141 147 if not len(picks_raw) or not len(arrivals_raw): 142 print "error: no pick or arrival information found"143 print "error: maybe you have a very old version of libxml/libxslt"148 print >> sys.stderr, "error: no pick or arrival information found" 149 print >> sys.stderr, "error: maybe you have a very old version of libxml/libxslt" 144 150 sys.exit(4) 145 151 … … 207 213 i = sys.argv[1] 208 214 except IndexError: 209 print "error: please give source of seiscomp3 xmldump as command argument"215 print >> sys.stderr, "error: please give source of seiscomp3 xmldump as command argument" 210 216 sys.exit(2) 211 217
Note: See TracChangeset
for help on using the changeset viewer.