8
from softwareproperties.SoftwareProperties import SoftwareProperties
9
from optparse import OptionParser
10
from gettext import gettext as _
12
if __name__ == "__main__":
13
locale.setlocale(locale.LC_ALL, "")
14
parser = OptionParser()
15
(options, args) = parser.parse_args()
18
print _("Error: must run as root")
22
print _("Error: need a repostiroy as argument")
25
sp = SoftwareProperties(options)
27
if not sp.add_source_from_line(line):
28
print _("Error: '%s' invalid" % line)