Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1108)

Unified Diff: third_party/gsutil/gslib/exception.py

Issue 2280023003: depot_tools: Remove third_party/gsutil (Closed)
Patch Set: Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/gsutil/gslib/commands/version.py ('k') | third_party/gsutil/gslib/help_provider.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/gsutil/gslib/exception.py
diff --git a/third_party/gsutil/gslib/exception.py b/third_party/gsutil/gslib/exception.py
deleted file mode 100644
index 6c95d7bfa9ffb572663f812051d08c9cd9fc2fb2..0000000000000000000000000000000000000000
--- a/third_party/gsutil/gslib/exception.py
+++ /dev/null
@@ -1,76 +0,0 @@
-# Copyright 2010 Google Inc. All Rights Reserved.
-#
-# Permission is hereby granted, free of charge, to any person obtaining a
-# copy of this software and associated documentation files (the
-# "Software"), to deal in the Software without restriction, including
-# without limitation the rights to use, copy, modify, merge, publish, dis-
-# tribute, sublicense, and/or sell copies of the Software, and to permit
-# persons to whom the Software is furnished to do so, subject to the fol-
-# lowing conditions:
-#
-# The above copyright notice and this permission notice shall be included
-# in all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-
-# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
-# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
-# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
-# IN THE SOFTWARE.
-
-"""gsutil exceptions."""
-
-
-class AbortException(StandardError):
- """Exception raised when a user aborts a command that needs to do cleanup."""
-
- def __init__(self, reason):
- StandardError.__init__(self)
- self.reason = reason
-
- def __repr__(self):
- return 'AbortException: %s' % self.reason
-
- def __str__(self):
- return 'AbortException: %s' % self.reason
-
-
-class CommandException(StandardError):
- """Exception raised when a problem is encountered running a gsutil command.
-
- This exception should be used to signal user errors or system failures
- (like timeouts), not bugs (like an incorrect param value). For the
- latter you should raise Exception so we can see where/how it happened
- via gsutil -D (which will include a stack trace for raised Exceptions).
- """
-
- def __init__(self, reason, informational=False):
- """Instantiate a CommandException.
-
- Args:
- reason: Text describing the problem.
- informational: Indicates reason should be printed as FYI, not a failure.
- """
- StandardError.__init__(self)
- self.reason = reason
- self.informational = informational
-
- def __repr__(self):
- return 'CommandException: %s' % self.reason
-
- def __str__(self):
- return 'CommandException: %s' % self.reason
-
-
-class ProjectIdException(StandardError):
-
- def __init__(self, reason):
- StandardError.__init__(self)
- self.reason = reason
-
- def __repr__(self):
- return 'ProjectIdException: %s' % self.reason
-
- def __str__(self):
- return 'ProjectIdException: %s' % self.reason
« no previous file with comments | « third_party/gsutil/gslib/commands/version.py ('k') | third_party/gsutil/gslib/help_provider.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698