~ubuntu-branches/ubuntu/trusty/schroot/trusty

« back to all changes in this revision

Viewing changes to bin/schroot/schroot-options-base.cc

  • Committer: Bazaar Package Importer
  • Author(s): Roger Leigh
  • Date: 2009-11-07 10:46:54 UTC
  • mfrom: (1.1.20 upstream) (2.1.6 experimental)
  • Revision ID: james.westby@ubuntu.com-20091107104654-kk1fp1icv8dzfyfi
* New upstream development release.
* schroot:
  - Return success when ending a session and the operation
    succeeded (Closes: #554907).

Show diffs side-by-side

added added

removed removed

Lines of Context:
200
200
      this->load_chroots = true;
201
201
      this->load_sessions = false;
202
202
      if (this->chroots.size() != 1 || all_used())
203
 
        throw opt::validation_error(_("Exactly one chroot must be specified when beginning a session"));
 
203
        throw opt::validation_error
 
204
          (_("Exactly one chroot must be specified when beginning a session"));
204
205
 
205
206
      this->all = this->all_chroots = this->all_sessions = false;
206
207
    }
210
211
    {
211
212
      // Session operations work on all chroots.
212
213
      this->load_chroots = this->load_sessions = true;
 
214
 
 
215
      if (!this->session_name.empty())
 
216
        throw opt::validation_error
 
217
          (_("--session-name is not permitted for the specified action; did you mean to use --chroot?"));
213
218
    }
214
219
  else if (this->action == ACTION_HELP ||
215
220
           this->action == ACTION_VERSION)