Skip to content
GitLab
Menu
Why GitLab
Pricing
Contact Sales
Explore
Why GitLab
Pricing
Contact Sales
Explore
Sign in
Get free trial
Primary navigation
Search or go to…
Project
ntpsec
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Privacy statement
Keyboard shortcuts
?
What's new
4
Snippets
Groups
Projects
Show more breadcrumbs
NTPsec
ntpsec
Commits
def1f112
Commit
def1f112
authored
8 years ago
by
Matt Selsky
Browse files
Options
Downloads
Patches
Plain Diff
Python3: Fix mixed tabs/spaces in ntpdig
parent
9e25052b
No related branches found
No related tags found
Tags containing commit
Loading
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
ntpclients/ntpdig
+5
-5
5 additions, 5 deletions
ntpclients/ntpdig
with
5 additions
and
5 deletions
ntpclients/ntpdig
+
5
−
5
View file @
def1f112
...
...
@@ -388,15 +388,15 @@ if __name__ == '__main__':
print
(
"
rec-org t21: %f xmt-dst t34: %f
"
%
(
pkt
.
t2
()
-
pkt
.
t1
(),
pkt
.
t3
()
-
pkt
.
t4
()))
adjusted
=
step
and
(
not
slew
or
(
slew
and
(
abs
(
offset
)
>
steplimit
)))
report
(
pkt
,
json
)
# If we can step but we cannot slew, then step.
# If we can step or slew and |offset| > steplimit, then step.
# If we can step but we cannot slew, then step.
# If we can step or slew and |offset| > steplimit, then step.
rc
=
True
offset
=
pkt
.
adjust
()
ntp
.
ntpc
.
setprogname
(
"
ntpdig
"
)
if
adjusted
:
rc
=
ntp
.
ntpc
.
step_systime
(
offset
)
elif
slew
:
rc
=
ntp
.
ntpc
.
adj_systime
(
offset
)
rc
=
ntp
.
ntpc
.
step_systime
(
offset
)
elif
slew
:
rc
=
ntp
.
ntpc
.
adj_systime
(
offset
)
if
rc
:
raise
SystemExit
(
0
)
else
:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment