Avoid using Python 2.6 syntax
authorMagnus Hagander <magnus@hagander.net>
Wed, 22 Dec 2010 14:00:14 +0000 (15:00 +0100)
committerMagnus Hagander <magnus@hagander.net>
Wed, 22 Dec 2010 14:00:14 +0000 (15:00 +0100)
gitdump.py

index 7fa202506459422a76d6a996bfc82bd91174cff1..fbe93f6d9a1acf3aee61d36ea28b40f4463d5f3c 100644 (file)
@@ -127,8 +127,9 @@ FROM repositories AS r WHERE approved ORDER BY name""")
                                        if not repoconf.has_section('gitweb'):
                                                repoconf.add_section('gitweb')
                                        repoconf.set('gitweb', 'tabwidth', tabwidth)
-                                       with open("%s/config" % repopath, "wb") as cf:
-                                               repoconf.write(cf)
+                                       cf = open("%s/config" % repopath, "wb")
+                                       repoconf.write(cf)
+                                       cf.close()
 
                        anonfile = "%s/git-daemon-export-ok" % repopath
                        htafile = "%s/.htaccess" % repopath