Skip to content

Commit

Permalink
Merge pull request #15 from stfc/remove_cruft
Browse files Browse the repository at this point in the history
Remove cruft
  • Loading branch information
Oli-Rest authored Jul 16, 2024
2 parents 26b624c + e6616be commit dbab854
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 16 deletions.
13 changes: 0 additions & 13 deletions mrepo.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,8 @@

variables = {}

enable = ('yes', 'on', 'true', '1')
disable = ('no', 'off', 'false', '0')

for scheme in ('reposync', 'reposyncs', 'reposyncf'):
urlparse.uses_netloc.insert(0, scheme)
urlparse.uses_query.insert(0, scheme)


class Options:
def __init__(self, args):
Expand Down Expand Up @@ -319,7 +314,6 @@ def getoption(self, section, option, var):
except ConfigParser.NoSectionError, e:
error(5, 'Failed to find section [%s]' % section)
except ConfigParser.NoOptionError, e:
# error(4, 'Failed to find option %s in [%s], set to default: %s' % (option, section, var))
info(5, 'Setting option %s in section [%s] to: %s (default)' % (option, section, var))
return var

Expand Down Expand Up @@ -357,7 +351,6 @@ def rewrite(self):
repo.url = substitute(repo.url, varlist)

def listrepos(self, names=None):
ret = []
if names:
return [repo for repo in self.repos if repo.name in names]
else:
Expand Down Expand Up @@ -953,11 +946,6 @@ def mirrorreposync(url, path, reponame, dist):
url = url.replace('reposync://', 'http://')
url = url.replace('reposyncf://', 'ftp://')

if cf.reposyncexcldebug:
reposync_exclude = "*-debuginfo"
else:
reposync_exclude = ""

opts = cf.reposyncoptions
if op.verbose < 3:
opts = opts + ' -q'
Expand Down Expand Up @@ -1016,7 +1004,6 @@ def mail(subject, msg):
try:
import smtplib
smtp = smtplib.SMTP(cf.smtpserver)
# server.set_debuglevel(1)
msg = 'Subject: [mrepo] %s\nX-Mailer: mrepo %s\n\n%s' % (subject, VERSION, msg)
for email in cf.mailto.split():
smtp.sendmail(cf.mailfrom, email, 'To: %s\n%s' % (email, msg))
Expand Down
3 changes: 0 additions & 3 deletions runtests.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ def test_synciter1(self):
onlyleft = []
keyequal = []
for a, b in mrepo.synciter(left, right):
# print "%s, %s, %s" % ( a, b, k )
if a is None:
onlyright.append(b)
elif b is None:
Expand Down Expand Up @@ -70,8 +69,6 @@ def setUp(self):

self.tmpdir = tmpdir = mkdtemp(prefix='mrepo_tests_')

# global "op" is needed by mrepo.Config, horrible for testing!

class TestConfig:
pass

Expand Down

0 comments on commit dbab854

Please sign in to comment.