Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Release Engineering
Public
distrobuild
Commits
1c1fe070
Commit
1c1fe070
authored
Apr 11, 2021
by
Mustafa Gezen
🏗
Browse files
Remove python3.8 incompatible calls
parent
a7b70d4f
Changes
2
Hide whitespace changes
Inline
Side-by-side
distrobuild/lookaside/__init__.py
View file @
1c1fe070
...
...
@@ -42,14 +42,14 @@ class Lookaside:
def
__init__
(
self
,
url
:
str
):
if
url
.
startswith
(
"file://"
):
self
.
backend
=
LookasideBackend
.
FILE
self
.
dir
=
url
.
removeprefix
(
"file://"
)
self
.
dir
=
url
[
len
(
"file://"
)
:]
elif
url
.
startswith
(
"s3://"
):
self
.
backend
=
LookasideBackend
.
S3
self
.
s3
=
boto3
.
client
(
"s3"
)
self
.
bucket
=
url
.
removeprefix
(
"s3://"
)
self
.
bucket
=
url
[
len
(
"s3://"
)
:]
elif
url
.
startswith
(
"gs://"
):
self
.
backend
=
LookasideBackend
.
GCS
self
.
gcs
=
storage
.
Client
().
bucket
(
url
.
removeprefix
(
"gs://"
))
self
.
gcs
=
storage
.
Client
().
bucket
(
url
[
len
(
"gs://"
)
:]
)
def
upload
(
self
,
f
:
BinaryIO
,
name
:
str
):
if
self
.
backend
==
LookasideBackend
.
FILE
:
...
...
distrobuild_scheduler/import_package.py
View file @
1c1fe070
...
...
@@ -45,7 +45,7 @@ async def do(package: Package, package_import: Import):
package
.
last_import
=
datetime
.
datetime
.
now
()
mode
=
"modules"
if
package_import
.
module
else
"rpms"
project
=
gl
.
projects
.
get
(
f
"
{
settings
.
repo_prefix
.
removeprefix
(
'/'
)
}
/
{
mode
}
/
{
gitlabify
(
package
.
name
)
}
"
)
project
=
gl
.
projects
.
get
(
f
"
{
settings
.
repo_prefix
[
1
:]
}
/
{
mode
}
/
{
gitlabify
(
package
.
name
)
}
"
)
project
.
visibility
=
"public"
project
.
save
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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