Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
installsystems
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Seblu
installsystems
Commits
a164cd39
Commit
a164cd39
authored
13 years ago
by
Aurélien Dunand
Committed by
Seblu
13 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Add image retrieval from ftp
Signed-off-by:
Seblu
<
sebastien.luttringer@smartjog.com
>
parent
61d093f8
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
installsystems/tools.py
+2
-2
2 additions, 2 deletions
installsystems/tools.py
with
2 additions
and
2 deletions
installsystems/tools.py
+
2
−
2
View file @
a164cd39
...
@@ -57,7 +57,7 @@ def copy(source, destination, uid=None, gid=None, mode=None, timeout=None):
...
@@ -57,7 +57,7 @@ def copy(source, destination, uid=None, gid=None, mode=None, timeout=None):
# trivial case
# trivial case
if
stype
==
dtype
==
"
file
"
:
if
stype
==
dtype
==
"
file
"
:
shutil
.
copy
(
source
,
destination
)
shutil
.
copy
(
source
,
destination
)
elif
stype
==
"
http
"
and
dtype
==
"
file
"
:
elif
(
stype
==
"
http
"
or
stype
==
"
ftp
"
)
and
dtype
==
"
file
"
:
f_dest
=
open
(
destination
,
"
w
"
)
f_dest
=
open
(
destination
,
"
w
"
)
f_source
=
urllib2
.
urlopen
(
source
,
timeout
=
timeout
)
f_source
=
urllib2
.
urlopen
(
source
,
timeout
=
timeout
)
f_dest
.
write
(
f_source
.
read
())
f_dest
.
write
(
f_source
.
read
())
...
@@ -113,7 +113,7 @@ def abspath(path):
...
@@ -113,7 +113,7 @@ def abspath(path):
Format a path to be absolute
Format a path to be absolute
'''
'''
ptype
=
pathtype
(
path
)
ptype
=
pathtype
(
path
)
if
ptype
in
(
"
http
"
,
"
ssh
"
):
if
ptype
in
(
"
http
"
,
"
ftp
"
,
"
ssh
"
):
return
path
return
path
elif
ptype
==
"
file
"
:
elif
ptype
==
"
file
"
:
if
path
.
startswith
(
"
file://
"
):
if
path
.
startswith
(
"
file://
"
):
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment