Skip to content

Commit

Permalink
regress: make sure python-template is valid python
Browse files Browse the repository at this point in the history
previously the template used @dirport@ as an integer, which is
considered a parser error. We now wrap the value with int("@dirport@")
which will make sure the template is valid python code and will throw a
runtime-error during conversion instead of a parser error it @dirport@
is replaced with anything that is not an integer.
  • Loading branch information
arogge committed Nov 13, 2020
1 parent af37774 commit 12d3433
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -21,5 +21,5 @@ import bareos.bsock

password = bareos.bsock.Password("bareos")
directorconsole = bareos.bsock.DirectorConsole(
address="@hostname@", port=@dirport@, password=password
address="@hostname@", port=int("@dirport@"), password=password
)

0 comments on commit 12d3433

Please sign in to comment.