Fix code for changing tab width
authorMagnus Hagander <magnus@hagander.net>
Sun, 23 Feb 2020 21:15:14 +0000 (22:15 +0100)
committerMagnus Hagander <magnus@hagander.net>
Sun, 23 Feb 2020 21:15:14 +0000 (22:15 +0100)
This has been broken for some time since py3 requires the options to be
in string format, it's just a very infrequent codepath.

gitdump.py

index 8ded84ca531431059083ed53c4d792f333ac7c3b..9293b0798a0c986c45e7f6837640d82444b539e4 100644 (file)
@@ -118,9 +118,10 @@ FROM repositories AS r WHERE approved ORDER BY name""")
                     if tabwidth != 8:
                         tabwidth_mod = True
                 if tabwidth_mod:
+                    print("Changing tab width for %s" % name)
                     if not repoconf.has_section('gitweb'):
                         repoconf.add_section('gitweb')
-                    repoconf.set('gitweb', 'tabwidth', tabwidth)
+                    repoconf.set('gitweb', 'tabwidth', str(tabwidth))
                     cf = open("%s/config" % repopath, "wb")
                     repoconf.write(cf)
                     cf.close()