[Pkg-javascript-commits] [ltx] 169/469: parse: require util or sys instead of utils

Jonas Smedegaard dr at jones.dk
Wed Aug 31 13:01:21 UTC 2016


This is an automated email from the git hooks/post-receive script.

js pushed a commit to branch master
in repository ltx.

commit e0aa4d9b5814e29874d895110fc6a883587dbc64
Author: Astro <astro at spaceboyz.net>
Date:   Mon Dec 20 23:15:48 2010 +0100

    parse: require util or sys instead of utils
---
 lib/parse.js | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/lib/parse.js b/lib/parse.js
index d6b4fa3..0265c8f 100644
--- a/lib/parse.js
+++ b/lib/parse.js
@@ -1,5 +1,10 @@
 var events = require('events');
-var utils = require('utils');
+var util;
+try {
+    util = require('util');
+} catch(e) {
+    util = require('sys');
+}
 var expat = require('node-expat');
 var element = require('./element');
 
@@ -34,7 +39,7 @@ exports.Parser = function() {
             el.t(str);
     });
 };
-utils.inherits(exports.Parser, events.EventEmitter);
+util.inherits(exports.Parser, events.EventEmitter);
 
 exports.Parser.prototype.write = function(data) {
     if (!this.parser.parse(data, false)) {

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/ltx.git



More information about the Pkg-javascript-commits mailing list