Skip to content
Permalink
Browse files

overviewer: add warning for CentOS/RHEL 6

If you're using CentOS/RHEL 6, you probably already can't run
Overviewer due to our dependency on argparse breaking python2.6
compatibility. However, if you somehow managed to get python2.7
working on CentOS 6, you now get a nice warning telling you to
finally get off your butt and use something else.

This warning can be dropped once we move to Python 3, which is why
this code was added in the first place: CentOS 6 has no Python 3
package that is still supported by upstream, not even in EPEL.
  • Loading branch information...
CounterPillow committed May 20, 2019
1 parent 2dc8ebd commit 522ee282192276dad70b1f00de7701db8f7fd105
Showing with 14 additions and 0 deletions.
  1. +14 −0 overviewer.py
@@ -63,6 +63,20 @@ def main():
"permissions instead. Overviewer does not need access to "
"critical system resources and therefore does not require "
"root access.")
try:
with open("/etc/redhat-release", "r") as release_f:
rel_contents = release_f.read()
try:
major_rel = re.search(r'\d(\.\d+)?', rel_contents).group(0).split('.')[0]
if major_rel == "6":
logging.warning(
"We will be dropping support for this release of your distribution "
"soon. Please upgrade as soon as possible, or you will not receive "
"future Overviewer updates.")
except AttributeError:
pass
except IOError:
pass

try:
cpus = multiprocessing.cpu_count()

0 comments on commit 522ee28

Please sign in to comment.
You can’t perform that action at this time.