~brian-murray/aptdaemon/bug-1436725

« back to all changes in this revision

Viewing changes to aptdaemon/worker/aptworker.py

  • Committer: Sebastian Heinlein
  • Date: 2014-02-08 15:55:50 UTC
  • mfrom: (964.1.1 aptdaemon)
  • Revision ID: devel@glatzor.de-20140208155550-l4zsr8op0s4fg4b7
Merge typo and logging.warning fixes. Thanks to Brian Murray

Show diffs side-by-side

added added

removed removed

Lines of Context:
479
479
        try:
480
480
            res = urlsplit(uri)
481
481
        except ValueError as error:
482
 
            log.warn("Failed to urlsplit '%s'", error)
 
482
            log.warning("Failed to urlsplit '%s'", error)
483
483
            return uri
484
484
        netloc_public = res.netloc.replace("%s:%s@" % (res.username,
485
485
                                                       res.password),
511
511
                machine, res.username, res.password)
512
512
            # this may happen if e.g. the order is unexpected
513
513
            if not re.search(sub_regexp, netrc_hosts_as_text):
514
 
                log.warn("can not replace existing netrc entry for '%s' "
 
514
                log.warning("can not replace existing netrc entry for '%s' "
515
515
                         "prepending it instead" % machine)
516
516
                netrc_hosts_as_text = new_netrc_entry + netrc_hosts_as_text
517
517
            else:
539
539
            # and restore permissions (or set default ones)
540
540
            os.chmod(auth_conf_path, mode)
541
541
        except OSError as error:
542
 
            log.warn("Failed to write auth.conf: '%s'" % error)
 
542
            log.warning("Failed to write auth.conf: '%s'" % error)
543
543
 
544
544
        # Return URI without user/pass
545
545
        return urlunsplit((res.scheme, netloc_public, res.path, res.query,