osquery / osquery-python

Python bindings for osquery's Thrift API
Other
295 stars 51 forks source link

'fix the warnings from 'is not 0' to '!= 0' in management.py #82

Closed bpmcdevitt closed 2 years ago

bpmcdevitt commented 3 years ago

I am working on a project where I am using this python library in a Windows and Linux environment. It is super convenient for getting python to communicate with osqueryd.

I am using this module with Python version 3.9 in my environment and I am receiving the following warnings referencing the management.py file:

In [1]: from osquery_interface import OsqueryInterface
c:\users\booboy\.virtualenvs\query_app_inf_osquery-dn8tsr2s\src\osquery\osquery\management.py:186: SyntaxWarning: "is not" with a literal. Did you mean "!="?
  if status.code is not 0:
c:\users\booboy\.virtualenvs\query_app_inf_osquery-dn8tsr2s\src\osquery\osquery\management.py:243: SyntaxWarning: "is not" with a literal. Did you mean "!="?
  if status.code is not 0:
c:\users\booboy\.virtualenvs\query_app_inf_osquery-dn8tsr2s\src\osquery\osquery\management.py:295: SyntaxWarning: "is not" with a literal. Did you mean "!="?

This PR will fix those warnings and replace the is not 0 with != 0 in the management.py file.

linux-foundation-easycla[bot] commented 3 years ago

CLA Signed

The committers are authorized under a signed CLA.