~rogpeppe/juju-core/themue-058-debug-log-api

« back to all changes in this revision

Viewing changes to charm/repo.go

  • Committer: Frank Mueller
  • Date: 2014-01-23 14:14:49 UTC
  • mfrom: (2152.1.95 juju-core)
  • Revision ID: frank.mueller@canonical.com-20140123141449-b30l57y7gs3wjkpw
debugger: merged trunk and fixed permission and interface problems

Show diffs side-by-side

added added

removed removed

Lines of Context:
10
10
        "fmt"
11
11
        "io"
12
12
        "io/ioutil"
 
13
        "net"
13
14
        "net/http"
14
15
        "net/url"
15
16
        "os"
138
139
        }
139
140
        resp, err := s.get(baseURL + strings.Join(charmSnippets, "&"))
140
141
        if err != nil {
 
142
                if url_error, ok := err.(*url.Error); ok {
 
143
                        switch url_error.Err.(type) {
 
144
                        case *net.DNSError, *net.OpError:
 
145
                                return nil, fmt.Errorf("Cannot access the charm store. Are you connected to the internet? Error details: %v", err)
 
146
                        }
 
147
                }
141
148
                return nil, err
142
149
        }
143
150
        defer resp.Body.Close()