~mvo/aptdaemon/support-change-credentials-on-add-repo

« back to all changes in this revision

Viewing changes to aptdaemon/worker.py

  • Committer: Michael Vogt
  • Date: 2012-09-03 12:31:00 UTC
  • Revision ID: michael.vogt@ubuntu.com-20120903123100-mz0o18jeebs71e6b
add comment

Show diffs side-by-side

added added

removed removed

Lines of Context:
526
526
            with open(auth_conf_path_tmp.name, "w") as auth_conf_tmp:
527
527
                auth_conf_tmp.write(netrc_hosts_as_text)
528
528
            os.rename(auth_conf_path_tmp.name, auth_conf_path)
 
529
            # and restore permissions (or set default ones)
529
530
            os.chmod(auth_conf_path, mode)
530
531
        except OSError as error:
531
532
            log.warn("Failed to write auth.conf: '%s'" % error)