~kelemeng/software-properties/bug945245

« back to all changes in this revision

Viewing changes to SoftwareProperties/SoftwareProperties.py

  • Committer: Michael Vogt
  • Date: 2006-09-04 20:49:31 UTC
  • mfrom: (357 sebi)
  • mto: (337.2.8 main)
  • mto: This revision was merged to the branch mainline in revision 360.
  • Revision ID: michael.vogt@ubuntu.com-20060904204931-a5e607442976edd4
* merged from Sebastian

Show diffs side-by-side

added added

removed removed

Lines of Context:
377
377
    else:
378
378
        self.treeview_cdroms.set_sensitive(True)
379
379
 
 
380
    if self.options.debug == True or self.options.massive_debug == True:
 
381
        print "ENABLED COMPS: %s" % self.distro.enabled_comps
 
382
        print "INTERNET COMPS: %s" % self.distro.download_comps
 
383
        print "MAIN SOURCES"
 
384
        for source in self.distro.main_sources:
 
385
            self.print_source_entry(source)
 
386
        print "CHILD SOURCES"
 
387
        for source in self.distro.child_sources:
 
388
            self.print_source_entry(source)
 
389
        print "CDROM SOURCES"
 
390
        for source in self.distro.cdrom_sources:
 
391
            self.print_source_entry(source)
 
392
        print "SOURCE CODE SOURCES"
 
393
        for source in self.distro.source_code_sources:
 
394
            self.print_source_entry(source)
 
395
        print "DISABLED SOURCES"
 
396
        for source in self.distro.disabled_sources:
 
397
            self.print_source_entry(source)
 
398
        print "ISV"
 
399
        for source in self.sourceslist_visible:
 
400
            self.print_source_entry(source)
 
401
 
 
402
  def print_source_entry(self, source):
 
403
    """Print the data of a source entry to the command line"""
 
404
    print source.dist
 
405
    for (label, value) in [("URI:", source.uri),
 
406
                           ("Comps:", source.comps),
 
407
                           ("Enabled:", not source.disabled),
 
408
                           ("Valid:", not source.invalid)]:
 
409
        print " %s %s" % (label, value)
 
410
    if source.template:
 
411
        for (label, value) in [("MatchURI:", source.template.match_uri),
 
412
                               ("BaseURI:", source.template.base_uri)]:
 
413
            print " %s %s" % (label, value)
 
414
    print "\n"
 
415
 
380
416
  def on_combobox_server_changed(self, combobox):
381
417
    """
382
418
    Replace the servers used by the main and update sources with
629
665
  
630
666
  def modified_sourceslist(self):
631
667
    """The sources list was changed and now needs to be saved and reloaded"""
632
 
    self.massive_debug_output()
 
668
    if self.options.massive_debug == True:
 
669
        self.massive_debug_output()
633
670
    self.modified = True
634
671
    self.button_revert.set_sensitive(True)
635
672
    self.save_sourceslist()