Commits

Steve Borho committed f5ff185

docdiff: during merge, use output file's extension for type detection

Problem and solution reported by Henrik Stuart

  • Participants
  • Parent commits c5ca3c3
  • Branches stable

Comments (0)

Files changed (1)

File contrib/docdiff.py

         sys.exit(1)
     elif len(args) == 2:
         local, other = [os.path.abspath(f) for f in args]
+        base, ext = os.path.splitext(local)
     else:
         local, base, other, output = [os.path.abspath(f) for f in args]
+        base, ext = os.path.splitext(output)
 
-    base, ext = os.path.splitext(local)
     if not ext or ext.lower()[1:] not in scripts.keys():
-        print 'Unsupported file type', local
+        print 'Unsupported file type', ext
         sys.exit(1)
 
     proc = win32api.GetCurrentProcess()