Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
nemu3
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1
Issues
1
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
nemu3
Commits
fae833d5
Commit
fae833d5
authored
Oct 09, 2013
by
Martín Ferrari
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix the linux version extractor, to cope with two-component version numbers (e.g. 3.10).
parent
282625fc
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
2 deletions
+4
-2
setup.py
setup.py
+1
-1
test/test_util.py
test/test_util.py
+3
-1
No files found.
setup.py
View file @
fae833d5
...
@@ -6,7 +6,7 @@ from distutils.core import setup, Extension, Command
...
@@ -6,7 +6,7 @@ from distutils.core import setup, Extension, Command
setup
(
setup
(
name
=
'nemu'
,
name
=
'nemu'
,
version
=
'0.
1
'
,
version
=
'0.
2
'
,
description
=
'A lightweight network emulator embedded in a small '
description
=
'A lightweight network emulator embedded in a small '
'python library.'
,
'python library.'
,
author
=
'Martín Ferrari, Alina Quereilhac'
,
author
=
'Martín Ferrari, Alina Quereilhac'
,
...
...
test/test_util.py
View file @
fae833d5
...
@@ -62,8 +62,10 @@ def get_devs_netns(node):
...
@@ -62,8 +62,10 @@ def get_devs_netns(node):
return process_ipcmd(out)
return process_ipcmd(out)
def make_linux_ver(string):
def make_linux_ver(string):
match = re.match(r'
(
\
d
+
)
\
.(
\
d
+
)
\
.(
\
d
+
)
(.
*
)
', string)
match = re.match(r'
(
\
d
+
)
\
.(
\
d
+
)
(
?
:
\
.(
\
d
+
))
?
(.
*
)
', string)
version, patchlevel, sublevel, extraversion = match.groups()
version, patchlevel, sublevel, extraversion = match.groups()
if not sublevel:
sublevel = 0
return (int(version) << 16) + (int(patchlevel) << 8) + int(sublevel)
return (int(version) << 16) + (int(patchlevel) << 8) + int(sublevel)
def get_linux_ver():
def get_linux_ver():
...
...
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