Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 870457 Details for
Bug 1072075
luci mishandling of distro release string leads to dropping some features and parameters
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
updated patch (using 1 as rstrip's "maxplit" is enough)
bz1072075-2.patch (text/plain), 1.36 KB, created by
Jan Pokorný [poki]
on 2014-03-04 15:14:38 UTC
(
hide
)
Description:
updated patch (using 1 as rstrip's "maxplit" is enough)
Filename:
MIME Type:
Creator:
Jan Pokorný [poki]
Created:
2014-03-04 15:14:38 UTC
Size:
1.36 KB
patch
obsolete
>--- site/luci/Extensions/LuciClusterInfo.py.orig 2014-03-03 21:05:31.737753800 +0100 >+++ site/luci/Extensions/LuciClusterInfo.py 2014-03-04 16:08:18.845946411 +0100 >@@ -27,6 +27,17 @@ > > luci_log = get_logger() > >+ >+def _get_minor_for_major(os_release, major): >+ # fairly generic non-re way to get minor version or 0 upon failure >+ l, major_dot = os_release, str(major) + '.' >+ lstrip_digits = lambda x: x.lstrip('0123456789') >+ tail_less = l[:-len(lstrip_digits(l[l.find(major_dot) + len(major_dot):]))] >+ try >+ return int(tail_less.rsplit(major_dot)[-1], 1) >+ except ValueError: >+ return 0 >+ > def getnodes(self, model): > try: > return map(lambda x: str(x.getName()), model.getNodes()) >@@ -610,9 +621,8 @@ > try: > cluster_os = model.getClusterOS() > if cluster_os.find('Tikanga') != -1: >- clumap['os_major'] = 5 >- os_minor = int(cluster_os[cluster_os.find('5.') + 2]) >- clumap['os_minor'] = os_minor >+ clumap['os_major'] = os_major = 5 >+ clumap['os_minor'] = os_minor = _get_minor_for_major(cluster_os, os_major) > if os_minor > 0: > clumap['has_sybase_agent'] = True > if os_minor > 1: >@@ -1568,7 +1578,7 @@ > try: > cluster_os = model.getClusterOS() > if cluster_os.find('Tikanga'): >- os_minor = int(cluster_os[cluster_os.find('5.') + 2]) >+ os_minor = _get_minor_for_major(cluster_os, 5) > if os_minor > 1: > vm_map['vm_migration_choice'] = True > except:
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 1072075
:
870126
| 870457