Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.libnetworkcache
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
slapos.libnetworkcache
Commits
6a6ffbe8
Commit
6a6ffbe8
authored
Sep 26, 2024
by
Thomas Gambier
🚴🏼
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add support for python3.12
parent
a15103a5
Pipeline
#37088
passed with stage
in 0 seconds
Changes
3
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
9 deletions
+14
-9
setup.py
setup.py
+9
-1
slapos/libnetworkcache.py
slapos/libnetworkcache.py
+5
-4
slapos/signature.py
slapos/signature.py
+0
-4
No files found.
setup.py
View file @
6a6ffbe8
...
...
@@ -37,8 +37,16 @@ setup(
classifiers
=
[
'Development Status :: 4 - Beta'
,
'License :: OSI Approved :: GNU General Public License (GPL)'
,
'Programming Language :: Python :: 2'
,
'Programming Language :: Python :: 2.7'
,
'Programming Language :: Python :: 3'
,
'Programming Language :: Python :: 3.7'
,
'Programming Language :: Python :: 3.8'
,
'Programming Language :: Python :: 3.9'
,
'Programming Language :: Python :: 3.10'
,
'Programming Language :: Python :: 3.11'
,
'Programming Language :: Python :: 3.12'
,
],
python_requires
=
">=2.7"
,
entry_points
=
{
'console_scripts'
:
[
'generate-signature-key = slapos.signature:run'
,
...
...
slapos/libnetworkcache.py
View file @
6a6ffbe8
...
...
@@ -28,14 +28,15 @@ import tempfile
import
traceback
from
base64
import
b64encode
,
b64decode
try
:
import
configp
arser
from
configparser
import
ConfigP
arser
from
http.client
import
HTTPConnection
,
HTTPSConnection
from
urllib.error
import
HTTPError
from
urllib.parse
import
urlsplit
from
urllib.request
import
urlopen
basestring
=
bytes
,
str
except
ImportError
:
import
ConfigParser
as
configparser
from
ConfigParser
import
SafeConfigParser
as
ConfigParser
ConfigParser
.
read_file
=
ConfigParser
.
readfp
from
httplib
import
HTTPConnection
,
HTTPSConnection
from
urllib2
import
HTTPError
,
urlopen
from
urlparse
import
urlsplit
...
...
@@ -197,8 +198,8 @@ class NetworkcacheClient(object):
def
__new_init
(
self
,
config
,
signature_certificate_list
=
None
):
if
not
hasattr
(
config
,
'get'
):
parser
=
configparser
.
Safe
ConfigParser
()
parser
.
read
fp
(
config
)
parser
=
ConfigParser
()
parser
.
read
_file
(
config
)
config
=
dict
(
parser
.
items
(
'networkcache'
))
self
.
config
=
config
path
=
config
.
get
(
'signature-private-key-file'
)
...
...
slapos/signature.py
View file @
6a6ffbe8
...
...
@@ -16,10 +16,6 @@ import argparse
import
os
import
subprocess
import
sys
try
:
import
configparser
except
ImportError
:
import
ConfigParser
as
configparser
def
generateCertificate
(
certificate_file
,
key_file
,
common_name
):
if
os
.
path
.
lexists
(
certificate_file
):
...
...
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