[Git][NTPsec/ntpsec][master] Added encoding definitions to python files

Eric S. Raymond gitlab at mg.gitlab.com
Wed May 3 02:17:52 UTC 2017


Eric S. Raymond pushed to branch master at NTPsec / ntpsec


Commits:
b7c9560b by Ian Bruene at 2017-05-03T02:17:44+00:00
Added encoding definitions to python files

- - - - -


18 changed files:

- ntpclients/ntpdig
- ntpclients/ntpkeygen
- ntpclients/ntploggps
- ntpclients/ntplogtemp
- ntpclients/ntpmon
- ntpclients/ntpq
- ntpclients/ntpsweep
- ntpclients/ntptrace
- ntpclients/ntpviz
- ntpclients/ntpwait
- pylib/__init__.py
- pylib/packet.py
- pylib/statfiles.py
- pylib/util.py
- tests/pylib/test_statfiles.py
- tests/pylib/test_util.py
- wafhelpers/autorevision.sh
- wafhelpers/pythonize-header


Changes:

=====================================
ntpclients/ntpdig
=====================================
--- a/ntpclients/ntpdig
+++ b/ntpclients/ntpdig
@@ -1,4 +1,5 @@
 #!/usr/bin/env python
+# -*- coding: utf-8 -*-
 """
 ntpdig - simple SNTP client
 


=====================================
ntpclients/ntpkeygen
=====================================
--- a/ntpclients/ntpkeygen
+++ b/ntpclients/ntpkeygen
@@ -1,4 +1,5 @@
 #!/usr/bin/env python
+# -*- coding: utf-8 -*-
 #
 # ntpkeygen - generate cryptographic keys for NTP clients and servers
 #


=====================================
ntpclients/ntploggps
=====================================
--- a/ntpclients/ntploggps
+++ b/ntpclients/ntploggps
@@ -1,5 +1,6 @@
 #!/usr/bin/env python
-# coding: utf-8
+# -*- coding: utf-8 -*-
+
 """\
 usage: ntploggps [-h] [-o] [-l LOGFILE] [-v] [-V]
 


=====================================
ntpclients/ntplogtemp
=====================================
--- a/ntpclients/ntplogtemp
+++ b/ntpclients/ntplogtemp
@@ -1,4 +1,6 @@
 #!/usr/bin/env python
+# -*- coding: utf-8 -*-
+
 """\
 usage: ntplogtemp [-h] [-l LOGFILE] [-o] [-q] [-v] [-w WAIT] [-V]
 


=====================================
ntpclients/ntpmon
=====================================
--- a/ntpclients/ntpmon
+++ b/ntpclients/ntpmon
@@ -1,4 +1,6 @@
 #!/usr/bin/env python
+# -*- coding: utf-8 -*-
+
 # SPDX-License-Identifier: BSD-2-clause
 '''\
 Any keystroke causes a poll and update. Keystroke commands:


=====================================
ntpclients/ntpq
=====================================
--- a/ntpclients/ntpq
+++ b/ntpclients/ntpq
@@ -1,4 +1,5 @@
 #!/usr/bin/env python
+# -*- coding: utf-8 -*-
 #
 # ntpq - query an NTP server using mode 6 commands
 #


=====================================
ntpclients/ntpsweep
=====================================
--- a/ntpclients/ntpsweep
+++ b/ntpclients/ntpsweep
@@ -1,4 +1,5 @@
 #!/usr/bin/env python
+# -*- coding: utf-8 -*-
 """
 ntpsweep - print various information about given NTP servers
 USAGE: ntpsweep [-<flag> [<val>] | --<name>[{=| }<val>]]... [hostfile]


=====================================
ntpclients/ntptrace
=====================================
--- a/ntpclients/ntptrace
+++ b/ntpclients/ntptrace
@@ -1,4 +1,5 @@
 #!/usr/bin/env python
+# -*- coding: utf-8 -*-
 """
 ntptrace - trace peers of an NTP server
 


=====================================
ntpclients/ntpviz
=====================================
--- a/ntpclients/ntpviz
+++ b/ntpclients/ntpviz
@@ -1,5 +1,5 @@
 #!/usr/bin/env python
-# coding: utf-8
+# -*- coding: utf-8 -*-
 """\
 ntpviz - logfile visualizer for NTP log files
 


=====================================
ntpclients/ntpwait
=====================================
--- a/ntpclients/ntpwait
+++ b/ntpclients/ntpwait
@@ -1,4 +1,5 @@
 #!/usr/bin/env python
+# -*- coding: utf-8 -*-
 """\
 ntpwait - Wait for ntpd to stabilize the system clock.
 USAGE: ntpwait [-n tries] [-s sleeptime] [-v] [-h]


=====================================
pylib/__init__.py
=====================================
--- a/pylib/__init__.py
+++ b/pylib/__init__.py
@@ -1,3 +1,4 @@
+# -*- coding: utf-8 -*-
 # SPDX-License-Identifier: BSD-2-clause
 #
 # This code runs compatibly under Python 2 and 3.x for x >= 2.


=====================================
pylib/packet.py
=====================================
--- a/pylib/packet.py
+++ b/pylib/packet.py
@@ -1,3 +1,5 @@
+# -*- coding: utf-8 -*-
+
 """
 packet.py - definitions and classes for Python querying of NTP
 


=====================================
pylib/statfiles.py
=====================================
--- a/pylib/statfiles.py
+++ b/pylib/statfiles.py
@@ -1,3 +1,5 @@
+# -*- coding: utf-8 -*-
+
 """
 statfiles.py - class for digesting and plotting NTP logfiles
 


=====================================
pylib/util.py
=====================================
--- a/pylib/util.py
+++ b/pylib/util.py
@@ -1,3 +1,4 @@
+# -*- coding: utf-8 -*-
 # Common utility functions
 # SPDX-License-Identifier: BSD-2-clause
 


=====================================
tests/pylib/test_statfiles.py
=====================================
--- a/tests/pylib/test_statfiles.py
+++ b/tests/pylib/test_statfiles.py
@@ -1,5 +1,5 @@
 #!/usr/bin/env python
-# coding: utf-8
+# -*- coding: utf-8 -*-
 
 import unittest
 import ntp.statfiles


=====================================
tests/pylib/test_util.py
=====================================
--- a/tests/pylib/test_util.py
+++ b/tests/pylib/test_util.py
@@ -1,5 +1,5 @@
 #!/usr/bin/env python
-# coding: utf-8
+# -*- coding: utf-8 -*-
 
 import unittest
 import ntp.util


=====================================
wafhelpers/autorevision.sh
=====================================
--- a/wafhelpers/autorevision.sh
+++ b/wafhelpers/autorevision.sh
@@ -609,6 +609,7 @@ pyOutput() {
 		1) PY_VCS_WC_MODIFIED="True" ;;
 	esac
 	tee << EOF
+# -*- coding: utf-8 -*-
 # ${GENERATED_HEADER}
 
 VCS_TYPE = "${VCS_TYPE}"


=====================================
wafhelpers/pythonize-header
=====================================
--- a/wafhelpers/pythonize-header
+++ b/wafhelpers/pythonize-header
@@ -1,4 +1,5 @@
 #!/usr/bin/env python
+# -*- coding: utf-8 -*-
 """
 Generate a Python module from a C file of macro definitions.
 
@@ -82,6 +83,7 @@ if __name__ == '__main__':
     else:
         for path in sys.argv[1:]:
             with open(path) as rfp:
+                sys.stdout.write("# -*- coding: utf-8 -*-\n")
                 sys.stdout.write("#\n# Definitions from %s begin\n#\n" % path)
                 pythonize(rfp, sys.stdout)
 



View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/b7c9560bd121d38ae318c83311ac9a5dc66f10f4

---
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/b7c9560bd121d38ae318c83311ac9a5dc66f10f4
You're receiving this email because of your account on gitlab.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ntpsec.org/pipermail/vc/attachments/20170503/1a4e21c5/attachment.html>


More information about the vc mailing list