]> granicus.if.org Git - python/commitdiff
Issue #10639: spec_newline wasn't defined globally unless main() was called; now...
authorJason R. Coombs <jaraco@jaraco.com>
Fri, 29 Jul 2011 13:31:56 +0000 (09:31 -0400)
committerJason R. Coombs <jaraco@jaraco.com>
Fri, 29 Jul 2011 13:31:56 +0000 (09:31 -0400)
Tools/scripts/reindent.py

index ed66bc14d1e552adb1e971b582777ec63f157ca0..89b5e2314994fff252151dd075de929512549510 100755 (executable)
@@ -52,6 +52,8 @@ verbose = False
 recurse = False
 dryrun = False
 makebackup = True
+"A specified newline to be used in the output (set by --newline option)"
+spec_newline = None
 
 
 def usage(msg=None):
@@ -64,11 +66,9 @@ def errprint(*args):
     sys.stderr.write(" ".join(str(arg) for arg in args))
     sys.stderr.write("\n")
 
-
 def main():
     import getopt
     global verbose, recurse, dryrun, makebackup, spec_newline
-    spec_newline = None
     try:
         opts, args = getopt.getopt(sys.argv[1:], "drnvh",
             ["dryrun", "recurse", "nobackup", "verbose", "newline=", "help"])