utils,
# Files
- api, artifact, build, config, constants, exceptions, fingerprint,
+ api, artifact, build, config, constants, custom_exceptions, fingerprint,
jenkins, jenkinsbase, job, node, result_set, result, view
)
__all__ = [
"command_line", "utils",
- "api", "artifact", "build", "config", "constants", "exceptions", "fingerprint",
+ "api", "artifact", "build", "config", "constants", "custom_exceptions", "fingerprint",
"jenkins", "jenkinsbase", "job", "node", "result_set", "result", "view"
]
__docformat__ = "epytext"
from jenkinsapi import constants
from jenkinsapi.jenkins import Jenkins
from jenkinsapi.artifact import Artifact
-from jenkinsapi.exceptions import ArtifactsMissing, TimeOut, BadURL
+from jenkinsapi.custom_exceptions import ArtifactsMissing, TimeOut, BadURL
log = logging.getLogger(__name__)
import hashlib
from jenkinsapi.fingerprint import Fingerprint
-from jenkinsapi.exceptions import ArtifactBroken
+from jenkinsapi.custom_exceptions import ArtifactBroken
log = logging.getLogger(__name__)
from jenkinsapi.artifact import Artifact
from jenkinsapi import config
from jenkinsapi.jenkinsbase import JenkinsBase
-from jenkinsapi.exceptions import NoResults
+from jenkinsapi.custom_exceptions import NoResults
from jenkinsapi.constants import STATUS_SUCCESS
from jenkinsapi.result_set import ResultSet
--- /dev/null
+"""
+Module for custom_exceptions specialized for jenkinsapi
+"""
+
+
+class JenkinsAPIException(Exception):
+ """
+ Base class for all errors
+ """
+ pass
+
+class NotFound(JenkinsAPIException):
+ """
+ Resource cannot be found
+ """
+ pass
+
+
+class ArtifactsMissing(NotFound):
+ """
+ Cannot find a build with all of the required artifacts.
+ """
+ pass
+
+
+class UnknownJob(KeyError, NotFound):
+ """
+ Jenkins does not recognize the job requested.
+ """
+ pass
+
+
+class UnknownView(KeyError, NotFound):
+ """
+ Jenkins does not recognize the view requested.
+ """
+ pass
+
+
+class UnknownNode(KeyError, NotFound):
+ """
+ Jenkins does not recognize the node requested.
+ """
+ pass
+
+
+class UnknownQueueItem(KeyError, NotFound):
+ """
+ Jenkins does not recognize the requested queue item
+ """
+ pass
+
+
+class NoBuildData(NotFound):
+ """
+ A job has no build data.
+ """
+ pass
+
+
+class ArtifactBroken(JenkinsAPIException):
+ """
+ An artifact is broken, wrong
+ """
+ pass
+
+
+class TimeOut(JenkinsAPIException):
+ """
+ Some jobs have taken too long to complete.
+ """
+ pass
+
+
+class WillNotBuild(JenkinsAPIException):
+ """
+ Cannot trigger a new build.
+ """
+ pass
+
+
+class NoResults(JenkinsAPIException):
+ """
+ A build did not publish any results.
+ """
+ pass
+
+
+class FailedNoResults(NoResults):
+ """
+ A build did not publish any results because it failed
+ """
+ pass
+
+
+class BadURL(ValueError, JenkinsAPIException):
+ """
+ A URL appears to be broken
+ """
+ pass
+
+
+class NotAuthorized(JenkinsAPIException):
+ """Not Authorized to access resource"""
+ # Usually thrown when we get a 403 returned
+ pass
+
+
+class NotSupportSCM(JenkinsAPIException):
+ """
+ It's a SCM that does not supported by current version of jenkinsapi
+ """
+ pass
+
+
+class NotConfiguredSCM(JenkinsAPIException):
+ """
+ It's a job that doesn't have configured SCM
+ """
+ pass
+
+
+class NotInQueue(JenkinsAPIException):
+ """
+ It's a job that is not in the queue
+ """
+ pass
+++ /dev/null
-"""
-Module for exceptions specialized for jenkinsapi
-"""
-
-
-class JenkinsAPIException(Exception):
- """
- Base class for all errors
- """
-
-
-class NotFound(JenkinsAPIException):
- """
- Resource cannot be found
- """
-
-
-class ArtifactsMissing(NotFound):
- """
- Cannot find a build with all of the required artifacts.
- """
-
-
-class UnknownJob(KeyError, NotFound):
- """
- Jenkins does not recognize the job requested.
- """
-
-
-class UnknownView(KeyError, NotFound):
- """
- Jenkins does not recognize the view requested.
- """
-
-
-class UnknownNode(KeyError, NotFound):
- """
- Jenkins does not recognize the node requested.
- """
-
-
-class UnknownQueueItem(KeyError, NotFound):
- """
- Jenkins does not recognize the requested queue item
- """
-
-
-class NoBuildData(NotFound):
- """
- A job has no build data.
- """
-
-
-class ArtifactBroken(JenkinsAPIException):
- """
- An artifact is broken, wrong
- """
-
-
-class TimeOut(JenkinsAPIException):
- """
- Some jobs have taken too long to complete.
- """
-
-
-class WillNotBuild(JenkinsAPIException):
- """
- Cannot trigger a new build.
- """
-
-
-class NoResults(JenkinsAPIException):
- """
- A build did not publish any results.
- """
-
-
-class FailedNoResults(NoResults):
- """
- A build did not publish any results because it failed
- """
-
-
-class BadURL(ValueError, JenkinsAPIException):
- """
- A URL appears to be broken
- """
-
-
-class NotAuthorized(JenkinsAPIException):
- """Not Authorized to access resource"""
- # Usually thrown when we get a 403 returned
-
-
-class NotSupportSCM(JenkinsAPIException):
- """
- It's a SCM that does not supported by current version of jenkinsapi
- """
-
-
-class NotConfiguredSCM(JenkinsAPIException):
- """
- It's a job that doesn't have configured SCM
- """
-
-
-class NotInQueue(JenkinsAPIException):
- """
- It's a job that is not in the queue
- """
"""
from jenkinsapi.jenkinsbase import JenkinsBase
-from jenkinsapi.exceptions import ArtifactBroken
+from jenkinsapi.custom_exceptions import ArtifactBroken
import urllib2
import re
import time
import datetime
-from jenkinsapi.exceptions import UnknownQueueItem, TimeOut
+from jenkinsapi.custom_exceptions import UnknownQueueItem, TimeOut
class Invocation(object):
from jenkinsapi.fingerprint import Fingerprint
from jenkinsapi.jenkinsbase import JenkinsBase
from jenkinsapi.utils.requester import Requester
-from jenkinsapi.exceptions import UnknownJob, JenkinsAPIException
+from jenkinsapi.custom_exceptions import UnknownJob, JenkinsAPIException
log = logging.getLogger(__name__)
import logging
from jenkinsapi import config
-from jenkinsapi.exceptions import JenkinsAPIException
+from jenkinsapi.custom_exceptions import JenkinsAPIException
log = logging.getLogger(__name__)
from jenkinsapi.jenkinsbase import JenkinsBase
from jenkinsapi.queue import QueueItem
from jenkinsapi.mutable_jenkins_thing import MutableJenkinsThing
-from jenkinsapi.exceptions import (
+from jenkinsapi.custom_exceptions import (
NoBuildData,
NotConfiguredSCM,
NotFound,
import logging
from jenkinsapi.node import Node
-from jenkinsapi.exceptions import UnknownNode
+from jenkinsapi.custom_exceptions import UnknownNode
from jenkinsapi.jenkinsbase import JenkinsBase
log = logging.getLogger(__name__)
"""
from jenkinsapi.jenkinsbase import JenkinsBase
-from jenkinsapi.exceptions import UnknownQueueItem
+from jenkinsapi.custom_exceptions import UnknownQueueItem
import logging
log = logging.getLogger(__name__)