changeset 28353:cd03fbd5ab57

debugcmdserver: use absolute_import and print_function
author Pulkit Goyal <7895pulkit@gmail.com>
date Sun, 06 Mar 2016 03:06:09 +0530
parents a92ee4d8a574
children 00f317788d33
files contrib/debugcmdserver.py tests/test-check-py3-compat.t
diffstat 2 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/contrib/debugcmdserver.py	Sun Mar 06 03:01:46 2016 +0530
+++ b/contrib/debugcmdserver.py	Sun Mar 06 03:06:09 2016 +0530
@@ -7,10 +7,12 @@
 # $ ./hg serve --cmds pipe | ./contrib/debugcmdserver.py -
 # o, 52   -> 'capabilities: getencoding runcommand\nencoding: UTF-8'
 
-import sys, struct
+from __future__ import absolute_import, print_function
+import struct
+import sys
 
 if len(sys.argv) != 2:
-    print 'usage: debugcmdserver.py FILE'
+    print('usage: debugcmdserver.py FILE')
     sys.exit(1)
 
 outputfmt = '>cI'
--- a/tests/test-check-py3-compat.t	Sun Mar 06 03:01:46 2016 +0530
+++ b/tests/test-check-py3-compat.t	Sun Mar 06 03:06:09 2016 +0530
@@ -5,8 +5,6 @@
   $ hg files 'set:(**.py)' | sed 's|\\|/|g' | xargs python contrib/check-py3-compat.py
   contrib/check-code.py not using absolute_import
   contrib/check-code.py requires print_function
-  contrib/debugcmdserver.py not using absolute_import
-  contrib/debugcmdserver.py requires print_function
   contrib/debugshell.py not using absolute_import
   contrib/fixpax.py not using absolute_import
   contrib/fixpax.py requires print_function