Modify

Ticket #270 (closed defect: fixed)

Opened 6 years ago

Last modified 4 years ago

cl find completely busted

Reported by: tim@… Owned by: thomas
Priority: blocker Milestone: 0.2.6
Component: moap Version: TRUNK
Keywords: Cc:

Description (last modified by thomas) (diff)

After your recent fixes and refactorings, moap cl find doesn't work for me any longer:

$ ~/gst-plugins-base$ moap cl find ogg
Traceback (most recent call last):
  File "/usr/local/bin/moap", line 28, in <module>
    sys.exit(main(sys.argv[1:]))
  File "/usr/local/lib/python2.5/site-packages/moap/main.py", line 13, in main
    ret = c.parse(argv)
  File "/usr/local/lib/python2.5/site-packages/moap/extern/command/command.py", line 226, in parse
    return self.aliasedSubCommands[command].parse(args[1:])
  File "/usr/local/lib/python2.5/site-packages/moap/extern/command/command.py", line 222, in parse
    return self.subCommands[command].parse(args[1:])
  File "/usr/local/lib/python2.5/site-packages/moap/extern/command/command.py", line 210, in parse
    return self.do(args)
  File "/usr/local/lib/python2.5/site-packages/moap/command/cl.py", line 398, in do
    entries = cl.find(needles, self.options.caseSensitive)
  File "/usr/local/lib/python2.5/site-packages/moap/command/cl.py", line 225, in find
    match = entry.match(needle, caseSensitive)
  File "/usr/local/lib/python2.5/site-packages/moap/command/cl.py", line 122, in match
    value = getattr(self, key).lower()
AttributeError: 'NoneType' object has no attribute 'lower'

Attachments

Change History

comment:1 Changed 6 years ago by thomas

  • Description modified (diff)

comment:2 Changed 6 years ago by thomas

It is only very slightly busted:

[moap-trunk] [thomas@level trunk]$ moap cl find tim
2007-08-08  Thomas Vander Stichele  <thomas at apestaart dot org>

        modified patch by: Tim Philipp-Müller <t.i.m at zen.co.uk>

        * moap/command/cl.py:
        * moap/test/test_commands_cl.py:
          Make moap changelog find case-insensitive by default, with
          a -c/--case-sensitive option to change that behaviour.
          Closes #264.

2007-07-31  Thomas Vander Stichele  <thomas at apestaart dot org>

        patch by: Tim Philipp-Müller <t.i.m at zen.co.uk>

        * moap/test/test_commands_cl.py:
          Fix test for people other than me.  Fixes #263.

2007-07-30  Thomas Vander Stichele  <thomas at apestaart dot org>

        patch by: Tim Philipp-Müller <t.i.m at zen.co.uk>

        * moap/command/cl.py:
        * moap/test/test_commands_cl.py:
          Make moap changelog find take and'd arguments.  Fixes #262.

2007-04-16  Thomas Vander Stichele  <thomas at apestaart dot org>

        * moap/command/doap.py (Ical.do, Doap.addOptions, Doap.handleOptions):
          Allow more than one doap file to be specified.
          Sort entries from various doap files on time, then doap file index.
        * moap/test/ical/mach.ical:
          Update ical file to sort the other way around.
          Coverage: 73 %   ( 798 / 1092)

2007-03-20  Thomas Vander Stichele  <thomas at apestaart dot org>

        patch by: Tim Philipp-Müller <t.i.m at zen.co.uk>

        * moap/util/util.py (writeTemp):
          Make moap ignore error out if no editor can be found.
          Closes #232.

And the testsuite runs.

Let me see if I can reproduce

comment:3 Changed 6 years ago by thomas

  • Status changed from new to closed
  • Resolution set to fixed

(In [320]) * moap/command/cl.py:

Skip ChangeEntry? keys that might be set to None. Fixes #270.

  • moap/test/test_commands_cl.py: Add test from ticket #270.

comment:4 Changed 6 years ago by tim@…

Thanks for the quick fix. You're right, it was only broken for some cases. What seems to happen here is that moap doesn't parse some gst-plugins-base ChangeLog? entries by Philippe Kalaf correctly (e.g. 2006-09-29) because there is only one space as separator instead of two spaces, so the e-mail address is parsed to be part of the name. I'll file a new bug for that though.

comment:5 Changed 6 years ago by thomas

The actual problem in this case was the Patch by and not Patch by:, which caused the ChangeEntry? not to have a contributor.

Since this is entirely possible, it is a bug, so I fixed it. I also changed the ChangeLog? to fix the entry, and added a test to catch it in the future.

View

Add a comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
The resolution will be deleted. Next status will be 'reopened'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.