[Lsb-messages] /var/www/bzr/lsb/devel/build_env r2240: for fun, modernize mkfilelists

Mats Wichmann mats at linuxfoundation.org
Sat Mar 8 18:22:05 UTC 2014


------------------------------------------------------------
revno: 2240
committer: Mats Wichmann <mats at linuxfoundation.org>
branch nick: build_env
timestamp: Sat 2014-03-08 11:22:05 -0700
message:
  for fun, modernize mkfilelists
modified:
  mkfilelists
-------------- next part --------------
=== modified file 'mkfilelists'
--- a/mkfilelists	2013-10-25 16:39:40 +0000
+++ b/mkfilelists	2014-03-08 18:22:05 +0000
@@ -1,4 +1,7 @@
 #!/usr/bin/python
+
+from __future__ import print_function
+
 """mkfilelists - create lists of headers and libs for core and desktop
 
 Options:
@@ -6,7 +9,7 @@
 --headers          -- generate lists of header files
 --libs             -- generate lists of libraries, per LSB version
 --package          -- generate packaging lists
---lsbversion=VER   -- target different LSB version than 4.1
+--lsbversion=VER   -- target different LSB version than 5.0
 -h, --help         -- print this text and exit
 """
 
@@ -29,7 +32,7 @@
 #============== Editable section ==============
 # for package lists, one library-version name corresponding to the
 # default version vanishes and becomes just lib - this version:
-DEFAULTVER = "4.1"
+DEFAULTVER = "5.0"
 
 # Lists of names of submodules from the database, divided into
 # the two packages -base (CORE) and -desktop (DESKTOP)
@@ -102,9 +105,9 @@
 def usage(code, msg=''):
     """print usage message and quit"""
     if msg:
-        print "ERROR:", msg
-        print
-    print __doc__
+        print("ERROR:", msg)
+        print()
+    print(__doc__)
     sys.exit(code)
 
 
@@ -318,7 +321,7 @@
 
     try:
         (opts, args) = getopt.getopt(sys.argv[1:], shortopts, longopts)
-    except getopt.error, msg:
+    except getopt.error as msg:
         usage(2, msg)
     if args:
         usage(2, msg)



More information about the lsb-messages mailing list