Skip to content

Commit

Permalink
Rename nav.py script-file to navmain.py
Browse files Browse the repository at this point in the history
This makes it possible for all the other scripts to find nav itself.
It will still be installed in a bin-dir as "nav".
  • Loading branch information
hmpf committed Nov 17, 2023
1 parent 05abdf0 commit 88f57c7
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ logengine = "nav.bin.logengine:main"
macwatch = "nav.bin.macwatch:main"
mailin = "nav.bin.mailin:main"
maintengine = "nav.bin.maintengine:main"
nav = "nav.bin.nav:main"
nav = "nav.bin.navmain:main"
navcheckservice = "nav.bin.navcheckservice:main"
navclean = "nav.bin.navclean:main"
navdf = "nav.bin.navdf:main"
Expand Down
5 changes: 3 additions & 2 deletions python/nav/bin/nav.py → python/nav/bin/navmain.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,10 @@
import argparse
import textwrap

from .. import colors
from nav import colors

try:
from ..startstop import ServiceRegistry, CommandFailedError, CrontabError
from nav.startstop import ServiceRegistry, CommandFailedError, CrontabError
except ImportError:
print(
"Fatal error: Could not find the nav.startstop module.\nIs your "
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/bin_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def test_nav_runs_without_error_without_arguments():
Added in regards to: https://github.com/Uninett/nav/issues/2601
"""
proc = subprocess.Popen(
[BINDIR + "/nav.py"],
[BINDIR + "/navmain.py"],
stderr=subprocess.STDOUT,
stdout=subprocess.PIPE,
)
Expand Down

0 comments on commit 88f57c7

Please sign in to comment.