Bug 759467 - RFE: Allow multiple groups in re
Summary: RFE: Allow multiple groups in re
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Fedora
Classification: Fedora
Component: cnucnu
Version: rawhide
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Susi Lehtola
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:3123c228
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-12-02 13:03 UTC by Jaroslav Škarvada
Modified: 2015-01-31 14:12 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-01-31 14:12:58 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
File: backtrace (1.07 KB, text/plain)
2011-12-02 13:03 UTC, Jaroslav Škarvada
no flags Details
Proposed patch (786 bytes, patch)
2011-12-02 14:40 UTC, Jaroslav Škarvada
no flags Details | Diff
Improved patch (787 bytes, patch)
2011-12-02 16:00 UTC, Jaroslav Škarvada
no flags Details | Diff

Description Jaroslav Škarvada 2011-12-02 13:03:43 UTC
abrt version: 1.1.18
architecture: x86_64
comment: It shouldn't abrt, but write some error and cleanly exit.
component: cnucnu
executable: /usr/bin/cnucnu
kernel: 2.6.35.14-106.fc14.x86_64
package: cnucnu-0-0.7.20110308git2033ec78.fc14
reason: helper.py:175:split_rc:TypeError: expected string or buffer
release: Fedora release 14 (Laughlin)
time: 1322830740
uid: 500

backtrace
-----
helper.py:175:split_rc:TypeError: expected string or buffer

Traceback (most recent call last):
  File "/usr/bin/cnucnu", line 71, in <module>
    if not shell.cmdloop():
  File "/usr/lib64/python2.7/cmd.py", line 143, in cmdloop
    stop = self.postcmd(stop, line)
  File "/usr/lib/python2.7/site-packages/cnucnu/checkshell.py", line 127, in postcmd
    print "Latest:", self.package.latest_upstream
  File "/usr/lib/python2.7/site-packages/cnucnu/package_list.py", line 271, in latest_upstream
    self._latest_upstream = upstream_max(self.upstream_versions)
  File "/usr/lib/python2.7/site-packages/cnucnu/helper.py", line 199, in upstream_max
    list.sort(cmp=upstream_cmp)
  File "/usr/lib/python2.7/site-packages/cnucnu/helper.py", line 148, in upstream_cmp
    v1, rc1 = split_rc(v1)
  File "/usr/lib/python2.7/site-packages/cnucnu/helper.py", line 175, in split_rc
    match = RC.match(version)
TypeError: expected string or buffer

Local variables in innermost frame:
re: <module 're' from '/usr/lib64/python2.7/re.pyc'>
version: ('3', '3_001')
RC: <_sre.SRE_Pattern object at 0x26a4810>

How to reproduce
-----
1. cnucnu --shell
2. https://github.com/EttusResearch/UHD-Mirror/archives/master
3. release_0*([0-9]+)_0*([0-9]+_[0-9]+)

Comment 1 Jaroslav Škarvada 2011-12-02 13:03:46 UTC
Created attachment 539622 [details]
File: backtrace

Comment 2 Jaroslav Škarvada 2011-12-02 14:40:31 UTC
Created attachment 539671 [details]
Proposed patch

Patch to allow multiple groups in re. All groups are concat.

Comment 3 Jaroslav Škarvada 2011-12-02 16:00:23 UTC
Created attachment 539693 [details]
Improved patch

Comment 4 Jaroslav Škarvada 2011-12-02 16:01:33 UTC
This patch allows parsing of more complex patterns, e.g. the uhd from backtrace.

Comment 5 Till Maas 2013-03-04 19:57:39 UTC
This feature has been added to cnucnu's git repository on fedorapeople and can be used now in the wiki. I will prepare an update for Fedora soon to allow to test it using the cnucnu shell.

Comment 6 Jaroslav Škarvada 2013-03-05 08:47:35 UTC
Thanks.

Comment 7 Till Maas 2015-01-31 14:12:58 UTC
FYI: cnucnu will be replaced by anitya/the-new-hotness soon:
https://github.com/fedora-infra/anitya
https://github.com/fedora-infra/the-new-hotness

Therefore a new update for Fedora does not make much sense.


Note You need to log in before you can comment on or make changes to this bug.