Skip to content

Commit

Permalink
Make it work also for installations from repo
Browse files Browse the repository at this point in the history
where the package 'puppetboard' is not installed
in the virtualenv.

Fixes #704
  • Loading branch information
gdubicki committed Jul 16, 2022
1 parent 73460c2 commit 5e2d4da
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions puppetboard/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

from puppetboard.utils import (get_or_abort, jsonprint,
url_for_field, url_static_offline, quote_columns_data)

from puppetboard.version import __version__ as own_version

REPORTS_COLUMNS = [
{'attr': 'end', 'filter': 'end_time',
Expand Down Expand Up @@ -63,7 +63,6 @@ def get_puppetdb():
timeout=app.config['PUPPETDB_TIMEOUT'],
protocol=app.config['PUPPETDB_PROTO'], )

own_version = pkg_resources.get_distribution("puppetboard").version
requests_version = pkg_resources.get_distribution("requests").version
user_agent_header = {
"user-agent": f"puppetboard/{own_version} (r/{requests_version})",
Expand Down

0 comments on commit 5e2d4da

Please sign in to comment.