~mvo/update-manager/not-automatic

« back to all changes in this revision

Viewing changes to UpdateManager/Core/DistUpgradeFetcherCore.py

  • Committer: Michael Vogt
  • Date: 2009-01-26 15:25:53 UTC
  • Revision ID: michael.vogt@ubuntu.com-20090126152553-ehw9uhiz74bjp1zm
UpdateManager/Core/DistUpgradeFetcherCore.py: add debug output

Show diffs side-by-side

added added

removed removed

Lines of Context:
48
48
        # options to pass to the release upgrader when it is run
49
49
        self.run_options = []
50
50
 
 
51
    def _debug(self, s):
 
52
        " helper to show debug information "
 
53
        print >> sys.stderr, s
 
54
 
51
55
    def showReleaseNotes(self):
52
56
        return True
53
57
 
128
132
                         _("Could not run the upgrade tool") + ".  " + _("This is most likely a bug in the upgrade tool. "
129
133
                          "Please report it as a bug"))
130
134
        return True
131
 
 
 
135
    
132
136
    def _expandUri(self, uri):
133
137
        uri_template = Template(uri)
134
138
        m = country_mirror()
135
139
        new_uri = uri_template.safe_substitute(countrymirror=m)
136
140
        # be paranoid and check if the given uri is really downloadable
137
141
        try:
138
 
            if not url_downloadable(new_uri):
 
142
            if not url_downloadable(new_uri, self._debug):
139
143
              raise Exception("failed to download %s" % new_uri)
140
144
        except Exception,e:
141
145
            print >> sys.stderr, "url '%s' could not be downloaded" % e