Skip to content

Commit

Permalink
fix: ovpn, remove stderr output
Browse files Browse the repository at this point in the history
  • Loading branch information
gsanchietti committed Dec 21, 2023
1 parent 388bf2d commit d80fe91
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/nethsec/ovpn/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,6 @@ def list_connected_clients(openvpninstance, type="subnet"):
"""
try:
p = subprocess.run(["/usr/bin/openvpn-status", "-t", type, f"/var/run/openvpn_{openvpninstance}.socket"], check=True, capture_output=True, text=True)
except Exception as e:
print(e, file=sys.stderr)
except:
return {}
return json.loads(p.stdout)
return json.loads(p.stdout)

0 comments on commit d80fe91

Please sign in to comment.