Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
emulab
emulab-devel
Commits
9fbac59e
Commit
9fbac59e
authored
Dec 29, 2016
by
Leigh B Stoller
Browse files
Minor changes to error handling.
parent
f7e53243
Changes
2
Hide whitespace changes
Inline
Side-by-side
apt/gitrepo.proxy.in
View file @
9fbac59e
...
...
@@ -153,9 +153,7 @@ sub Clone()
if
(
system
("
$GIT
cat-file -e refs/heads/master:profile.py
")
&&
system
("
$GIT
cat-file -e refs/heads/master:profile.rspec
"))
{
chdir
("
$REPODIR
");
system
("
/bin/rm -rf
$REPODIR
/
$reponame
");
fatal
("
No geni-lib script or rspec in this repository
");
print
STDERR
"
No geni-lib script or rspec in this repository
\n
";
}
return
0
;
}
...
...
@@ -192,7 +190,7 @@ sub Update()
}
if
(
system
("
$GIT
cat-file -e refs/heads/master:profile.py
")
&&
system
("
$GIT
cat-file -e refs/heads/master:profile.rspec
"))
{
fatal
(
"
No geni-lib script or rspec in this repository
"
)
;
print
STDERR
"
No geni-lib script or rspec in this repository
\n
";
}
return
0
;
}
...
...
apt/manage_profile.in
View file @
9fbac59e
...
...
@@ -365,9 +365,7 @@ if (exists($new_args{'repourl'})) {
my
$output
=
emutil::
ExecQuiet
("
$MANAGEGITREPO
clone -n
$reponame
'
$repourl
'
");
if
(
$?
)
{
print
STDERR
$output
;
$errors
{"
error
"}
=
$output
;
UserError
();
UserError
(
$output
);
}
$new_args
{'
reponame
'}
=
$reponame
;
}
...
...
@@ -376,9 +374,7 @@ if (exists($new_args{'repourl'})) {
#
my
$output
=
emutil::
ExecQuiet
("
$MANAGEGITREPO
hash -n
$reponame
");
if
(
$?
)
{
print
STDERR
$output
;
$errors
{"
error
"}
=
$output
;
UserError
();
UserError
(
$output
);
}
$repohash
=
$output
;
chomp
(
$repohash
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment