summaryrefslogtreecommitdiff
path: root/giscanner/scannermain.py
diff options
context:
space:
mode:
authorSimon Feltman <sfeltman@src.gnome.org>2014-04-28 15:34:14 -0700
committerThomas A Caswell <tcaswell@gmail.com>2015-09-29 15:10:33 -0400
commit06166e54cea2302bf9213f18881495eb2b5d089d (patch)
tree3185ab3f0e7c27a905ba81b283cd71ee44a53fc6 /giscanner/scannermain.py
parent8d6456344b80fa5f8f745fc92e364ee8b6a75cbf (diff)
downloadgobject-introspection-06166e54cea2302bf9213f18881495eb2b5d089d.tar.gz
giscanner: Use print as a function for Python 3 compatibility
Use future import "print_function" and update relevant uses of print as a function call. See: PEP 3105 https://bugzilla.gnome.org/show_bug.cgi?id=679438
Diffstat (limited to 'giscanner/scannermain.py')
-rwxr-xr-xgiscanner/scannermain.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/giscanner/scannermain.py b/giscanner/scannermain.py
index 63df7264..b2b286f5 100755
--- a/giscanner/scannermain.py
+++ b/giscanner/scannermain.py
@@ -22,6 +22,7 @@
from __future__ import absolute_import
from __future__ import division
+from __future__ import print_function
import errno
import optparse
@@ -345,8 +346,8 @@ def extract_filelist(options):
def create_namespace(options):
if options.strip_prefix:
- print """g-ir-scanner: warning: Option --strip-prefix has been deprecated;
-see --identifier-prefix and --symbol-prefix."""
+ print("""g-ir-scanner: warning: Option --strip-prefix has been deprecated;
+see --identifier-prefix and --symbol-prefix.""")
options.identifier_prefixes.append(options.strip_prefix)
# We do this dance because the empty list has different semantics from
@@ -549,8 +550,9 @@ def scanner_main(args):
message.fatal("warnings configured as fatal")
return 1
elif warning_count > 0 and options.warn_all is False:
- print ("g-ir-scanner: %s: warning: %d warnings suppressed (use --warn-all to see them)"
- % (transformer.namespace.name, warning_count, ))
+ print("g-ir-scanner: %s: warning: %d warnings suppressed "
+ "(use --warn-all to see them)" %
+ (transformer.namespace.name, warning_count, ))
# Write out AST
if options.packages_export: