[narval] fix pypi.upload checker harder
authorJulien Cristau <julien.cristau@logilab.fr>
Wed, 18 Jun 2014 17:24:26 +0200
changeset 1533 b0d9c98a09de
parent 1532 409795075de7
child 1534 b22c01912961
[narval] fix pypi.upload checker harder Thanks, pylint. Related to #4002584
_narval/checkers/apycot/pypi.py
--- a/_narval/checkers/apycot/pypi.py	Tue Jun 17 15:58:38 2014 +0200
+++ b/_narval/checkers/apycot/pypi.py	Wed Jun 18 17:24:26 2014 +0200
@@ -1,9 +1,7 @@
 #!/usr/bin/env python
 # -*- coding: utf-8 -*-
 
-import os
-import subprocess
-import sys
+from os.path import exists, join, abspath
 
 import apycotlib
 
@@ -20,7 +18,7 @@
             },
         }
 
-    def run(self, test):
+    def do_check(self, test):
         """run the distutils 'setup.py register sdist upload' command
 
         The user running the narval bot must have a properly filled
@@ -28,7 +26,7 @@
         """
         path = test.project_path()
         if not exists(join(path, 'setup.py')):
-            raise SetupException('No file %s' % abspath(join(path, 'setup.py')))
+            raise apycotlib.SetupException('No file %s' % abspath(join(path, 'setup.py')))
         python = pyversions(test)[0]
         cmdargs = [python, 'setup.py', 'register', 'sdist', 'upload']
         if not self.options.get('verbose'):