Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Speicher <rspeicher@gmail.com>2014-03-22 23:36:54 +0400
committerRobert Speicher <rspeicher@gmail.com>2014-03-22 23:36:54 +0400
commitfa340595746ba18fae3c6422ff4c9ea4af8e3023 (patch)
tree43152470b8c6035c0111a6b8b762b8f5098d77b9 /lib/gitlab
parentae1a3148242907b21e9952f1964919622b4f3129 (diff)
Default message for SatelliteNotExistError
Diffstat (limited to 'lib/gitlab')
-rw-r--r--lib/gitlab/satellite/satellite.rb16
1 files changed, 8 insertions, 8 deletions
diff --git a/lib/gitlab/satellite/satellite.rb b/lib/gitlab/satellite/satellite.rb
index bcf3012bd92..9e3c3997e55 100644
--- a/lib/gitlab/satellite/satellite.rb
+++ b/lib/gitlab/satellite/satellite.rb
@@ -1,5 +1,9 @@
module Gitlab
- class SatelliteNotExistError < StandardError; end
+ class SatelliteNotExistError < StandardError
+ def initialize(msg = "Satellite doesn't exist")
+ super
+ end
+ end
module Satellite
class Satellite
@@ -17,12 +21,8 @@ module Gitlab
Gitlab::Satellite::Logger.error(message)
end
- def raise_no_satellite
- raise SatelliteNotExistError.new("Satellite doesn't exist")
- end
-
def clear_and_update!
- raise_no_satellite unless exists?
+ raise SatelliteNotExistError unless exists?
File.exists? path
@repo = nil
@@ -55,7 +55,7 @@ module Gitlab
# * Changes the current directory to the satellite's working dir
# * Yields
def lock
- raise_no_satellite unless exists?
+ raise SatelliteNotExistError unless exists?
File.open(lock_file, "w+") do |f|
begin
@@ -77,7 +77,7 @@ module Gitlab
end
def repo
- raise_no_satellite unless exists?
+ raise SatelliteNotExistError unless exists?
@repo ||= Grit::Repo.new(path)
end