From e98a18bb8dec9f163b85dcedff4e3e45b70210c7 Mon Sep 17 00:00:00 2001 From: Magnus Hagander Date: Thu, 7 Feb 2019 22:40:18 +0100 Subject: [PATCH] It seems tabremover is not needed in python3 --- gitdump.py | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/gitdump.py b/gitdump.py index 8555652..d0ddd81 100644 --- a/gitdump.py +++ b/gitdump.py @@ -20,18 +20,6 @@ import filecmp from util.LockFile import LockFile -class TabRemover(object): - """ - Trivial class that removes leading tabs from each row of a file - being read. - """ - def __init__(self, filename): - self.f = open(filename) - - def readline(self): - return self.f.readline().lstrip("\t") - - class AuthorizedKeysDumper(object): def __init__(self, db, conf): self.db = db @@ -118,7 +106,7 @@ FROM repositories AS r WHERE approved ORDER BY name""") df.close() # Check if we need to change the tab width (default is 8) repoconf = configparser.ConfigParser() - repoconf.readfp(TabRemover("%s/config" % repopath)) + repoconf.read("%s/config" % repopath) tabwidth_mod = False if repoconf.has_option('gitweb', 'tabwidth'): if tabwidth != int(repoconf.get('gitweb', 'tabwidth')): -- 2.39.5