Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ISC Open Source Projects
Kea
Commits
be7f08f0
Commit
be7f08f0
authored
Aug 13, 2012
by
Jelte Jansen
Browse files
[2172] set mem_info to None in OSX before overwriting
parent
97ad1206
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/lib/python/isc/sysinfo/sysinfo.py
View file @
be7f08f0
...
@@ -425,6 +425,7 @@ class SysInfoOSX(SysInfoFreeBSDOSX):
...
@@ -425,6 +425,7 @@ class SysInfoOSX(SysInfoFreeBSDOSX):
# was read. However, on OSX, physmem is not necessarily the correct
# was read. However, on OSX, physmem is not necessarily the correct
# value. But since it does not fail and does work on most BSD's, it's
# value. But since it does not fail and does work on most BSD's, it's
# left in the base class and overwritten here
# left in the base class and overwritten here
self
.
_mem_total
=
None
try
:
try
:
s
=
subprocess
.
check_output
([
'sysctl'
,
'-n'
,
'hw.memsize'
])
s
=
subprocess
.
check_output
([
'sysctl'
,
'-n'
,
'hw.memsize'
])
self
.
_mem_total
=
int
(
s
.
decode
(
'utf-8'
).
strip
())
self
.
_mem_total
=
int
(
s
.
decode
(
'utf-8'
).
strip
())
...
...
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