mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Eliminate the zillion warning messages when running gnucash with the
--add-price-quotes flags. git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@7715 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
372e6bb3ac
commit
e3ca297efb
@ -32,6 +32,8 @@
|
||||
(gnc:session-begin session url
|
||||
ignore-lock?
|
||||
create-if-needed?)
|
||||
(eq? 'no-err (gw:enum-<gnc:BackendError>-val->sym
|
||||
(gnc:session-get-error session) #f))
|
||||
(gnc:session-load session)
|
||||
session)))
|
||||
(or result
|
||||
|
@ -281,10 +281,12 @@ the current value of the path.")
|
||||
(lambda ()
|
||||
(gnc:use-guile-module-here! '(gnucash price-quotes))
|
||||
(gnc:suspend-gui-refresh)
|
||||
(gnc:engine-suspend-events)
|
||||
(if (not (gnc:add-quotes-to-book-at-url val))
|
||||
(begin
|
||||
(gnc:error "Failed to add quotes to " val)
|
||||
(gnc:shutdown 1)))
|
||||
(gnc:engine-suspend-events)
|
||||
(gnc:resume-gui-refresh))
|
||||
gnc:*batch-mode-things-to-do*)))
|
||||
"FILE"
|
||||
|
@ -640,6 +640,11 @@
|
||||
(keep-going? #t))
|
||||
|
||||
(cond
|
||||
((eq? fq-results #f)
|
||||
(set! keep-going? #f)
|
||||
(if (gnc:ui-is-running?)
|
||||
(gnc:error-dialog (_ "Unable to get quotes or diagnose the problem."))
|
||||
(gnc:warn (_ "Unable to get quotes or diagnose the problem."))))
|
||||
((member 'missing-lib fq-results)
|
||||
(set! keep-going? #f)
|
||||
(if (gnc:ui-is-running?)
|
||||
@ -738,19 +743,22 @@ Run 'update-finance-quote' as root to install them.") "\n")))
|
||||
|
||||
(define (gnc:add-quotes-to-book-at-url url)
|
||||
(let* ((session (gnc:url->loaded-session url #f #f))
|
||||
(quote-ok? (and session
|
||||
(gnc:book-add-quotes
|
||||
(gnc:session-get-book session)))))
|
||||
(quote-ok? #f))
|
||||
(if session
|
||||
(begin
|
||||
(set! quote-ok? (and (gnc:book-add-quotes
|
||||
(gnc:session-get-book session))))
|
||||
|
||||
(if (not quote-ok?) (gnc:msg "book-add-quotes failed"))
|
||||
(and session (gnc:session-save session))
|
||||
(if (not (eq? 'no-err
|
||||
(gw:enum-<gnc:BackendError>-val->sym
|
||||
(gnc:session-get-error session) #f)))
|
||||
(set! quote-ok? #f))
|
||||
(if (not quote-ok?)
|
||||
(gnc:msg "session-save failed " (gnc:session-get-error session)))
|
||||
(and session (gnc:session-destroy session))
|
||||
(if (not quote-ok?) (gnc:msg "book-add-quotes failed"))
|
||||
(gnc:session-save session)
|
||||
(if (not (eq? 'no-err
|
||||
(gw:enum-<gnc:BackendError>-val->sym
|
||||
(gnc:session-get-error session) #f)))
|
||||
(set! quote-ok? #f))
|
||||
(if (not quote-ok?)
|
||||
(gnc:msg "session-save failed " (gnc:session-get-error session)))
|
||||
(gnc:session-destroy session))
|
||||
(gnc:error "book-add-quotes unable to open file"))
|
||||
quote-ok?))
|
||||
|
||||
; (define (get-1-quote exchange . items)
|
||||
|
Loading…
Reference in New Issue
Block a user