fahrplan_download.js: fix
This commit is contained in:
parent
ee0ccaa827
commit
4b5916302c
|
@ -33,6 +33,8 @@ function get(path, cb) {
|
|||
req.on('response', function(res) {
|
||||
if (res.statusCode === 200)
|
||||
cb(res);
|
||||
else
|
||||
console.warn(res.statusCode + ': ' + path);
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -102,12 +104,12 @@ function downloadXml(path, attrMapper) {
|
|||
p.addListener('xmlDecl', function(version, encoding, standalone) {
|
||||
f.write('<?xml');
|
||||
if (version)
|
||||
f.write(' version="' + version + "'");
|
||||
f.write(' version="' + version + '"');
|
||||
if (encoding)
|
||||
f.write(' encoding="' + encoding + "'");
|
||||
f.write(' encoding="' + encoding + '"');
|
||||
if (standalone)
|
||||
f.write(' standalone="' + standalone + "'");
|
||||
f.write('?>');
|
||||
f.write(' standalone="' + (standalone ? 'yes' : 'no') + '"');
|
||||
f.write("?>\n");
|
||||
});
|
||||
|
||||
res.on('data', function(data) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user