Commit a92d463b authored by Eric S. Raymond's avatar Eric S. Raymond

Don't barf on no preferred type.

parent 38ee890b
......@@ -8154,8 +8154,12 @@ def do_sourcetype(self, line):
if not self.chosen():
complain(b"no repo has been chosen.")
return
repo = self.chosen()
if not line:
print(self.chosen().vcs.name)
if self.chosen().vcs:
print("%s: %s" % (repo.name, repo.vcs.name))
else:
print("%s: no preferred type." % repo.name)
else:
for repotype in vcstypes + extractors:
if line.lower() == repotype.name:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment