/*
GoCheese -- Python private package repository and caching proxy
-Copyright (C) 2019 Sergey Matveev <stargrave@stargrave.org>
- 2019 Elena Balakhonova <balakhonova_e@riseup.net>
+Copyright (C) 2019-2020 Sergey Matveev <stargrave@stargrave.org>
+ 2019-2020 Elena Balakhonova <balakhonova_e@riseup.net>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
"errors"
"io/ioutil"
"log"
+ "os"
"strings"
)
func refreshPasswd() {
passwd, err := ioutil.ReadFile(*passwdPath)
+ if os.IsNotExist(err) {
+ return
+ }
if err != nil {
log.Fatal(err)
}
log.Fatalf("%s:%d: %s: %s", *passwdPath, i, login, err)
}
passwordsNew[login] = auther
- log.Println("Added password for " + login)
+ log.Println("added password for " + login)
}
passwords = passwordsNew
}