summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--rhimport/core.go14
-rw-r--r--rhimport/fetcher.go3
2 files changed, 0 insertions, 17 deletions
diff --git a/rhimport/core.go b/rhimport/core.go
index 12ad35c..25a4090 100644
--- a/rhimport/core.go
+++ b/rhimport/core.go
@@ -25,13 +25,11 @@
package rhimport
import (
- "bufio"
"fmt"
"io/ioutil"
"log"
"os"
"path"
- "strings"
"code.helsinki.at/rhrd-go/rddb"
"github.com/andelf/go-curl"
@@ -47,8 +45,6 @@ const (
ARCHIV_HOST = "archiv.helsinki.at"
ARCHIV_USER = "rhimport"
ARCHIV_BASE_PATH = "/srv/archiv"
-
- CBA_API_KEY_FILE = "/etc/cba-api.key"
)
var (
@@ -110,16 +106,6 @@ func (p *FilePolicy) FromString(str string) error {
return nil
}
-func getCBAApiKey() string {
- key_file, err := os.Open(CBA_API_KEY_FILE)
- if err == nil {
- defer key_file.Close()
- data, _ := bufio.NewReader(key_file).ReadString('\n')
- return strings.TrimSpace(string(data))
- }
- return ""
-}
-
type AttachmentChunk struct {
Data []byte
Error error
diff --git a/rhimport/fetcher.go b/rhimport/fetcher.go
index db7ac3e..2740055 100644
--- a/rhimport/fetcher.go
+++ b/rhimport/fetcher.go
@@ -143,9 +143,6 @@ func checkYoutubeDL(ctx *Context, res *Result, uri *url.URL) *youtubeDLInfo {
var stderr, stdout bytes.Buffer
cmd.Stdout = &stdout
cmd.Stderr = &stderr
- if cba_api_key := getCBAApiKey(); cba_api_key != "" {
- cmd.Env = append(os.Environ(), "CBA_API_KEY="+cba_api_key)
- }
ctx.stdlog.Printf("running youtube-dl for '%s'", ctx.SourceUri)
done := make(chan *youtubeDLInfo)