Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade the /gandi/init script to Python 3 #31

Open
Seb35 opened this issue Dec 20, 2024 · 1 comment
Open

Upgrade the /gandi/init script to Python 3 #31

Seb35 opened this issue Dec 20, 2024 · 1 comment

Comments

@Seb35
Copy link
Contributor

Seb35 commented Dec 20, 2024

On a new server I created in Debian 12 (created in Debian 11 then upgraded to Debian 12), the script /gandi/init is crashing on startup (executed by gandi-bootstrap and gandi-postboot) because it is written in Python 2 but executed with Python 3 (see #11).

I open this task specifically to upgrade /gandi/init to Python 3; this file is not in this package but probably something in Gandi’s infrastructure, but it is interacting with this package and it is crashing gandi-bootstrap.

But together with #5 (when /gandi/init is written in Bash) there should be a better solution to execute this script, depending on its internal language: Bash, Python 2, Python 3.

@Seb35
Copy link
Contributor Author

Seb35 commented Dec 20, 2024

I did the following changes on the /gandi/init Python 2 script to upgrade it to Python 3:

  • octal notation (3 changes): e.g. 07000o700
  • function print (1 change): print …print(…)
  • function file() removed (25 changes): file('…')with open('…') as f: (there may be opens in opens, so care should be taken about the variables names)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant