Permalink
Browse files

Only print the 'percentage should not go down...' message if we are p…

…rofiling
  • Loading branch information...
1 parent aa991b2 commit 3eddbacdd57ef8266d26fe721516b7359de28bb9 @hughsie committed Apr 5, 2012
Showing with 6 additions and 3 deletions.
  1. +6 −3 libzif/zif-state.c
View
@@ -559,9 +559,12 @@ zif_state_set_percentage (ZifState *state, guint percentage)
/* is it less */
if (percentage < state->priv->last_percentage) {
- zif_state_print_parent_chain (state, 0);
- g_critical ("percentage should not go down from %i to %i on %p!",
- state->priv->last_percentage, percentage, state);
+ if (state->priv->enable_profile) {
+ zif_state_print_parent_chain (state, 0);
+ g_critical ("percentage should not go down from %i to %i on %p!",
+ state->priv->last_percentage, percentage, state);
+ }
+ goto out;
}
/* we're done, so we're not preventing cancellation anymore */

0 comments on commit 3eddbac

Please sign in to comment.