Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

python regexp.pattern error #1

Closed
drzraf opened this issue May 9, 2013 · 5 comments
Closed

python regexp.pattern error #1

drzraf opened this issue May 9, 2013 · 5 comments
Labels
🐛 bug Something isn't working, or a fix is proposed

Comments

@drzraf
Copy link

drzraf commented May 9, 2013

--- ./maildir-deduplicate.py.old    2013-05-09 13:03:03.603295769 +0200
+++ ./maildir-deduplicate.py    2013-05-09 12:19:31.000000000 +0200
@@ -385,10 +385,10 @@
     if len(doomed) == len(duplicate_set):
         if opts.remove_matching:
             sys.stderr.write("/%s/ matched whole set; not removing any duplicates.\n" %
-                             opts.remove_matching.pattern)
+                             opts.remove_matching)
         elif opts.remove_not_matching:
             sys.stderr.write("/%s/ matched whole set; not removing any duplicates.\n" %
-                             opts.remove_not_matching.pattern)
+                             opts.remove_not_matching)
         else:
             fatal("BUG: removal strategy tried to remove all duplicates in set!")
         return { }
@aspiers
Copy link
Contributor

aspiers commented May 9, 2013

Please can you explain what the issue is by providing some sample output? This works fine for me without the above patch.

@drzraf
Copy link
Author

drzraf commented May 9, 2013

$ python -V
Python 2.7.3

$ python maildir-deduplicate.py -n -R '\.aful'  ~/mb1/aful/ ~/mb2/.aful/
Processing 676 mails in ~/mb1/aful ......
Processing 0 mails in ~/mb2/.aful 

Subject: [aful] subject test 1
Traceback (most recent call last):
  File "maildir-deduplicate.py", line 544, in <module>
    main()
  File "maildir-deduplicate.py", line 490, in main
    duplicates_run(opts, maildir_paths)
  File "maildir-deduplicate.py", line 511, in duplicates_run
    find_duplicates(mails_by_hash, opts)
  File "maildir-deduplicate.py", line 340, in find_duplicates
    removed += process_duplicate_set(sizes, opts)
  File "maildir-deduplicate.py", line 349, in process_duplicate_set
    doomed = choose_duplicates_to_remove(duplicate_set, opts)
  File "maildir-deduplicate.py", line 391, in choose_duplicates_to_remove
    opts.remove_not_matching.pattern)
AttributeError: 'str' object has no attribute 'pattern'

@aspiers
Copy link
Contributor

aspiers commented May 9, 2013

Ah, I see the problem. Your patch wasn't right - please can you try aspiers/maildir-deduplicate@c3b35588c and let me know if it works?

@drzraf
Copy link
Author

drzraf commented May 9, 2013

this solves the issue
thanks !

@aspiers aspiers closed this as completed in da59846 May 9, 2013
kdeldycke pushed a commit that referenced this issue Jul 26, 2014
pull to fix bug in determining file sizes for deduplication when using --remove-older-flag
@github-actions
Copy link

github-actions bot commented Oct 5, 2020

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 5, 2020
@kdeldycke kdeldycke added 🐛 bug Something isn't working, or a fix is proposed and removed bug labels Nov 23, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
🐛 bug Something isn't working, or a fix is proposed
Projects
None yet
Development

No branches or pull requests

3 participants