Skip to content

Commit 9891a7b

Browse files
committed
added optional debug information
1 parent 3f2a002 commit 9891a7b

File tree

2 files changed

+30
-11
lines changed

2 files changed

+30
-11
lines changed

probe.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,9 @@ def main():
9797
json_payload_data = []
9898
try:
9999
request_task = requests.get(url_task, params=task_data, verify=False)
100+
if config['debug']:
101+
logging.debug(request_task.headers)
102+
logging.debug(request_task.text)
100103
json_response = request_task.json()
101104
request_task.close()
102105
gc.collect()

setup.py

Lines changed: 27 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
#3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse
1111
# or promote products derived from this software without specific prior written permission.
1212

13-
#THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
13+
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
1414
# INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
1515
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
1616
# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
@@ -19,13 +19,14 @@
1919
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
2020
# EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2121

22-
try:
23-
from setuptools import setup
24-
except ImportError:
25-
from distutils.core import setup
2622

27-
with open('README.md') as f:
28-
readme = f.read()
23+
from setuptools import setup, find_packages
24+
25+
26+
def read(path):
27+
with open(path, 'r') as f:
28+
return f.read()
29+
2930

3031
requires = [
3132
"pysnmp >= 4.2.5",
@@ -39,13 +40,28 @@
3940

4041
setup(
4142
name='Python Mini Probe',
42-
version='0.1',
43+
version=read('VERSION.txt'),
4344
author='Paessler AG',
4445
author_email='[email protected]',
4546
license='BSD 3.0',
4647
description='Python MiniProbe for PRTG',
47-
long_description=readme,
48-
#packages=find_packages(),
49-
install_requires=requires
48+
long_description=read('README.md'),
49+
install_requires=requires,
50+
packages=find_packages(),
51+
url='https://github.com/PaesslerAG/PythonMiniProbe',
52+
classifiers=[
53+
"Development Status :: 4 - Beta",
54+
"Environment :: Console",
55+
"License :: OSI Approved :: BSD License",
56+
"Programming Language :: Python",
57+
],
58+
#entry_points={
59+
# 'console_scripts': [
60+
# 'probe = miniprobe.probe.main'
61+
# ]
62+
#}
63+
data_files=[
64+
65+
]
5066
)
5167

0 commit comments

Comments
 (0)