Skip to content

Commit 4ed063f

Browse files
authored
apt_info.py: use docstring for module documentation (#211)
Signed-off-by: Frank Sachsenheim <[email protected]>
1 parent 1cb6223 commit 4ed063f

File tree

1 file changed

+22
-20
lines changed

1 file changed

+22
-20
lines changed

Diff for: apt_info.py

+22-20
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,26 @@
11
#!/usr/bin/env python3
2-
#
3-
# Description: Expose metrics from apt. This is inspired by and
4-
# intended to be a replacement for the original apt.sh.
5-
#
6-
# This script deliberately does *not* update the apt cache. You need
7-
# something else to run `apt update` regularly for the metrics to be
8-
# up to date. This can be done in numerous ways, but the canonical way
9-
# is to use the normal `APT::Periodic::Update-Package-Lists`
10-
# setting.
11-
#
12-
# This, for example, will enable a nightly job that runs `apt update`:
13-
#
14-
# echo 'APT::Periodic::Update-Package-Lists "1";' > /etc/apt/apt.conf.d/99_auto_apt_update.conf
15-
#
16-
# See /usr/lib/apt/apt.systemd.daily for details.
17-
#
18-
# Dependencies: python3-apt, python3-prometheus-client
19-
#
20-
# Authors: Kyle Fazzari <[email protected]>
21-
# Daniel Swarbrick <[email protected]>
2+
3+
"""
4+
Description: Expose metrics from apt. This is inspired by and
5+
intended to be a replacement for the original apt.sh.
6+
7+
This script deliberately does *not* update the apt cache. You need
8+
something else to run `apt update` regularly for the metrics to be
9+
up to date. This can be done in numerous ways, but the canonical way
10+
is to use the normal `APT::Periodic::Update-Package-Lists`
11+
setting.
12+
13+
This, for example, will enable a nightly job that runs `apt update`:
14+
15+
echo 'APT::Periodic::Update-Package-Lists "1";' > /etc/apt/apt.conf.d/99_auto_apt_update.conf
16+
17+
See /usr/lib/apt/apt.systemd.daily for details.
18+
19+
Dependencies: python3-apt, python3-prometheus-client
20+
21+
Authors: Kyle Fazzari <[email protected]>
22+
Daniel Swarbrick <[email protected]>
23+
"""
2224

2325
import apt
2426
import apt_pkg

0 commit comments

Comments
 (0)