<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>13093</bug_id>
          
          <creation_ts>2018-12-19 09:22:28 +0000</creation_ts>
          <short_desc>Fix pylint reported issues</short_desc>
          <delta_ts>2019-01-12 18:31:04 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>6</classification_id>
          <classification>Yocto Project Subprojects</classification>
          <product>Security Response Tool</product>
          <component>General</component>
          <version>2.7</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>2.7 M2</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="David Reyna">david.reyna</reporter>
          <assigned_to name="David Reyna">david.reyna</assigned_to>
          <cc>ross.burton</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>No (bug/feature does not impact docs)</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>82534</commentid>
    <comment_count>0</comment_count>
    <who name="David Reyna">david.reyna</who>
    <bug_when>2018-12-19 09:22:28 +0000</bug_when>
    <thetext>These are issues reported from Ross by pylint :


 PYTHONPATH=bin/:lib/ pylint --load-plugins pylint_django -E lib
************* Module lib.srtmain.urls
lib/srtmain/urls.py:102:26: E1101: Instance of &apos;URLResolver&apos; has no
&apos;regex&apos; member (no-member)
lib/srtmain/urls.py:102:26: E1101: Instance of &apos;URLPattern&apos; has no
&apos;regex&apos; member (no-member)
************* Module lib.acme.views
lib/acme/views.py:46:24: E0602: Undefined variable &apos;landing&apos;
(undefined-variable)
************* Module lib.users.views
lib/users/views.py:84:4: E0602: Undefined variable &apos;url&apos; (undefined-variable)
lib/users/views.py:84:41: E0602: Undefined variable &apos;views&apos; (undefined-variable)
lib/users/views.py:98:32: E0602: Undefined variable &apos;landing&apos;
(undefined-variable)
lib/users/views.py:211:64: E1101: Class &apos;traceback&apos; has no
&apos;format_exc&apos; member (no-member)
lib/users/views.py:211:64: E0602: Undefined variable &apos;traceback&apos;
(undefined-variable)
************* Module lib.orm.models
lib/orm/models.py:498:31: E0602: Undefined variable
&apos;VulnerabilityProduct&apos; (undefined-variable)
lib/orm/models.py:541:26: E0602: Undefined variable &apos;key_prime&apos;
(undefined-variable)
lib/orm/models.py:541:36: E0602: Undefined variable &apos;key_sub&apos;
(undefined-variable)
lib/orm/models.py:657:28: E0602: Undefined variable
&apos;VulnerabilityProduct&apos; (undefined-variable)
lib/orm/models.py:657:95: E0602: Undefined variable
&apos;VulnerabilityProduct&apos; (undefined-variable)
lib/orm/models.py:665:27: E0602: Undefined variable
&apos;VulnerabilityProduct&apos; (undefined-variable)
lib/orm/models.py:665:94: E0602: Undefined variable
&apos;VulnerabilityProduct&apos; (undefined-variable)
lib/orm/models.py:831:11: E0602: Undefined variable &apos;release_version&apos;
(undefined-variable)
lib/orm/models.py:904:11: E0602: Undefined variable &apos;vulnerability&apos;
(undefined-variable)
lib/orm/models.py:904:29: E0602: Undefined variable &apos;vulnerability&apos;
(undefined-variable)
lib/orm/models.py:905:42: E1101: Instance of &apos;Investigation&apos; has no
&apos;cve&apos; member (no-member)
lib/orm/models.py:980:26: E1101: Instance of &apos;dict&apos; has no &apos;iteritems&apos;
member (no-member)
************* Module lib.srtgui.typeaheads
lib/srtgui/typeaheads.py:22:0: E0611: No name &apos;Project&apos; in module
&apos;orm.models&apos; (no-name-in-module)
************* Module lib.srtgui.widgets
lib/srtgui/widgets.py:465:18: E0602: Undefined variable &apos;Project&apos;
(undefined-variable)
lib/srtgui/widgets.py:469:18: E1121: Too many positional arguments for
method call (too-many-function-args)
************* Module lib.srtgui.views
lib/srtgui/views.py:724:23: E1120: No value for argument &apos;context&apos; in
function call (no-value-for-parameter)
lib/srtgui/views.py:802:23: E1120: No value for argument &apos;context&apos; in
function call (no-value-for-parameter)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>82586</commentid>
    <comment_count>1</comment_count>
    <who name="David Reyna">david.reyna</who>
    <bug_when>2018-12-21 22:48:35 +0000</bug_when>
    <thetext>1. The reported pylint issues have been resolved.

Two exceptions were disabled in &quot;lib/srtgui/urls.py&quot; for code that supports the different APIs between Django-1.11 and Django-2.x.

2. For reference, here was my process for installing and running pylint on my Ubuntu-16.04 host. My host has both Python-2 and Python-3, and the SRTool is designed for Python-3.

 $ sudo apt install pylint3
 $ pip3 install pylint_django
 $ PYTHONPATH=bin/:lib/ pylint3 --load-plugins pylint_django -E lib</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>82765</commentid>
    <comment_count>2</comment_count>
    <who name="David Reyna">david.reyna</who>
    <bug_when>2019-01-12 18:31:04 +0000</bug_when>
    <thetext>Implemented and documented.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>