1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
|
Description: fix warnings
Author: Xavier Guimard <yadd@debian.org>
Forwarded: no
Last-Update: 2020-04-30
--- a/npm2deb/__init__.py
+++ b/npm2deb/__init__.py
@@ -427,7 +427,7 @@
def download(self):
utils.debug(1, "downloading %s@%s tarball from npm registry" % (self.name, self.version))
info = _getstatusoutput('npm pack "%s@%s"' % (self.name, self.version))
- if info[0] is not 0:
+ if info[0] != 0:
exception = "Error downloading package %s@%s\n" % (self.name, self.version)
exception += info[1]
raise ValueError(exception)
--- a/npm2deb/scripts.py
+++ b/npm2deb/scripts.py
@@ -302,7 +302,7 @@
def get_npm2deb_instance(args):
- if not args.node_module or len(args.node_module) is 0:
+ if not args.node_module or len(args.node_module) == 0:
print('please specify a node_module.')
exit(1)
try:
|