about summary refs log tree commit diff
path: root/buildtools
diff options
context:
space:
mode:
authorgiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2017-07-19 01:48:38 +0000
committergiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2017-07-19 01:48:38 +0000
commit9f96b8eab4965d1a5c57b4177c299cdc6dfbfa02 (patch)
tree3f6e006898b8663f62d54b4101b0271b136bcd7b /buildtools
parent11058d75b808d60f100f4822ee4f145fe3929274 (diff)
downloadnetpbm-mirror-9f96b8eab4965d1a5c57b4177c299cdc6dfbfa02.tar.gz
netpbm-mirror-9f96b8eab4965d1a5c57b4177c299cdc6dfbfa02.tar.xz
netpbm-mirror-9f96b8eab4965d1a5c57b4177c299cdc6dfbfa02.zip
Make 'makeman' work with Python 3.6 - 2nd try
git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@3033 9d0c8265-081b-0410-96cb-a4ca84ce46f8
Diffstat (limited to 'buildtools')
-rwxr-xr-xbuildtools/makeman12
1 files changed, 6 insertions, 6 deletions
diff --git a/buildtools/makeman b/buildtools/makeman
index dee6d6ef..dc8e45ce 100755
--- a/buildtools/makeman
+++ b/buildtools/makeman
@@ -32,7 +32,7 @@
 #   Added footer message to clarify original source. 
 #
 
-import os, sys, exceptions, re
+import os, sys, re
 
 source = "netpbm documentation"
 section = 1
@@ -50,7 +50,7 @@ source.  The master documentation is at
 .IP
 .B http://netpbm.sourceforge.net/doc/'''
 
-class LiftException(exceptions.Exception):
+class LiftException(Exception):
     def __init__(self, message, retval=1):
         self.message = message
         self.retval = retval
@@ -341,11 +341,11 @@ def main(args, mainout=sys.stdout, mainerr=sys.stderr):
                 outfp.write(outdoc)
                 outfp.close()	# under Windows you can't rename an open file
                 stem = file[:file.find(".")]
-                os.rename(tempfile, stem + "." + `sectmap[file]`)
-    except LiftException, e:
+                os.rename(tempfile, stem + "." + repr(sectmap[file]))
+    except LiftException as e:
         mainerr.write("makeman: " + e.message + "\n")
         return e.retval
-    except IOError, e:
+    except IOError as e:
         mainerr.write("makeman: file I/O error: %s\n" % e)
         return 3
     except KeyboardInterrupt:
@@ -360,7 +360,7 @@ def main(args, mainout=sys.stdout, mainerr=sys.stderr):
 
 if __name__ == "__main__":
     # Run the main sequence
-    raise SystemExit, main(sys.argv[1:])
+    raise SystemExit(main(sys.argv[1:]))
 
 # The following sets edit modes for GNU EMACS
 # Local Variables: