Skip to content

Commit

Permalink
Merge pull request #13 from akki/patch-1
Browse files Browse the repository at this point in the history
Use more Pythonic way to initialise attribute of JMXConnection
  • Loading branch information
dgildeh authored May 25, 2019
2 parents 01bd76e + a5efb68 commit 7e00e70
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions python/jmxquery/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ class JMXConnection(object):
The main class that connects to the JMX endpoint via a local JAR to run queries
"""

def __init__(self, connection_uri: str, jmx_username: str = None, jmx_password: str = None, java_path: str = None):
def __init__(self, connection_uri: str, jmx_username: str = None, jmx_password: str = None, java_path: str = DEFAULT_JAVA_PATH):
"""
Creates instance of JMXQuery set to a specific connection uri for the JMX endpoint
Expand All @@ -128,9 +128,7 @@ def __init__(self, connection_uri: str, jmx_username: str = None, jmx_password:
self.connection_uri = connection_uri
self.jmx_username = jmx_username
self.jmx_password = jmx_password
self.java_path = DEFAULT_JAVA_PATH
if java_path != None:
self.java_path = java_path
self.java_path = java_path

def __run_jar(self, queries: List[JMXQuery], timeout) -> List[JMXQuery]:
"""
Expand Down

0 comments on commit 7e00e70

Please sign in to comment.