summaryrefslogtreecommitdiffstats
path: root/Tools/scripts/fixnotice.py
diff options
context:
space:
mode:
Diffstat (limited to 'Tools/scripts/fixnotice.py')
-rwxr-xr-xTools/scripts/fixnotice.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/Tools/scripts/fixnotice.py b/Tools/scripts/fixnotice.py
index 0ae4872..aac8697 100755
--- a/Tools/scripts/fixnotice.py
+++ b/Tools/scripts/fixnotice.py
@@ -1,4 +1,4 @@
-#! /usr/bin/env python
+#! /usr/bin/env python3
"""(Ostensibly) fix copyright notices in files.
@@ -50,9 +50,9 @@ VERBOSE = 0
def usage(code, msg=''):
- print __doc__ % globals()
+ print(__doc__ % globals())
if msg:
- print msg
+ print(msg)
sys.exit(code)
@@ -62,7 +62,7 @@ def main():
opts, args = getopt.getopt(sys.argv[1:], 'hv',
['help', 'oldnotice=', 'newnotice=',
'dry-run', 'verbose'])
- except getopt.error, msg:
+ except getopt.error as msg:
usage(1, msg)
for opt, arg in opts:
@@ -92,10 +92,10 @@ def process(file):
i = data.find(OLD_NOTICE)
if i < 0:
if VERBOSE:
- print 'no change:', file
+ print('no change:', file)
return
elif DRYRUN or VERBOSE:
- print ' change:', file
+ print(' change:', file)
if DRYRUN:
# Don't actually change the file
return