Skip to content

Commit 698f6b9

Browse files
committed
- use basename to remove leading directory from progname
1 parent e6bcca8 commit 698f6b9

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

sqlalchemy_collectd/client/plugin.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import os
12
import socket
23
import sys
34

@@ -54,7 +55,7 @@ def start_plugin(
5455
hostname = socket.gethostname()
5556

5657
if progname is None:
57-
progname = sys.argv[0]
58+
progname = os.path.basename(sys.argv[0])
5859

5960
sender_ = sender.Sender(hostname, progname)
6061
collection_target = collector.CollectionTarget.collection_for_name(

0 commit comments

Comments
 (0)