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

not working new Version of systemd_timesyncd (Ubuntu 20.04) #3

Open
as149 opened this issue Aug 16, 2021 · 1 comment
Open

not working new Version of systemd_timesyncd (Ubuntu 20.04) #3

as149 opened this issue Aug 16, 2021 · 1 comment

Comments

@as149
Copy link

as149 commented Aug 16, 2021

Hi,
on Systems with python 3.8, the response ist always "LEAP STATUS CRITICAL - System clock is not in sync. | leap_status=2;0;2;;2".

I think there is a problem with line 205 "if line.split(': ')[1] == 'yes\n':".
When I comment it out, the "tdctl_status" is "0".
When I print the Line out ( "print(if line.split(': ')[1])" ), the output in my SSH-Session is "yes" followed by new line.

Greetings

@as149
Copy link
Author

as149 commented Aug 17, 2021

Excample for "print(line.split(': '))":

Ubuntu 18.04.5 with Python 3.6.9 prints out:

['       System clock synchronized', 'yes\n']

Ubuntu 20.04.2 with Python 3.8.10 prints out:

['System clock synchronized', 'yes                        \n']

I think there is no Problem with Python Version rather than with Version of "timedatectl".

When changing the Code (Line 205) from if line.split(': ')[1] == 'yes\n': to if 'yes' in line.split(': ')[1]: it works.

@as149 as149 changed the title not working with python 3.8 not working new Version of systemd_timesyncd (Ubuntu 20.04) Aug 17, 2021
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