Commit Graph

481 Commits

Author SHA1 Message Date
Rodolfo García Peñas (kix)
ea8c0c6f3e __generate_randomheader uses now string
This patch converts the string to bytes to use crc32.

We can remore the fffffff because in python3 is always positive value.
In other patch.
2020-09-01 17:40:12 +02:00
Rodolfo García Peñas (kix)
7980f7ff1a IMAP.py calls Internaldate2epoch with bytes argument
The function Internaldate2epoch needs a bytes argument,
not an string, we need encode it:

imaplibutil.Internaldate2epoch(messagestr.encode('utf-8'))
2020-09-01 17:40:12 +02:00
Rodolfo García Peñas (kix)
d011702b5b removed virtual_imaplib2
Now we use the system imaplib2. I am using Debian.
2020-08-31 16:24:26 +02:00
Rodolfo García Peñas (kix)
28470ae655 folder/UIDMaps.py Removed extra chars
These chars can be removed.
2020-08-30 14:10:53 +02:00
Rodolfo García Peñas (kix)
db1ee5b3e9 folder/UIDMaps.py changed not var in
This patch changes:

if not var1 in var2

with

if var1 not in var2
2020-08-30 14:04:43 +02:00
Rodolfo García Peñas (kix)
4442a7ce67 folder/UIDMaps.py import fcntl
First, this file calls fcntl, but it has a typo.

Then, I import the fcntl library, as done in offlineimap/accounts.py
using portalocker first.
2020-08-30 14:01:51 +02:00
Rodolfo García Peñas (kix)
e4cb1a93be Removed unused variables
These variables are not used
2020-08-30 13:55:30 +02:00
Rodolfo García Peñas (kix)
8cbdc65ebf folder/UIDMaps.py split the if
This patch splits the if to avoid multiple commands in the same line.
2020-08-30 13:53:57 +02:00
Rodolfo García Peñas (kix)
c68e70519d folder/Maildir.py split the if
This patch splits the if to avoid multiple commands in the same line.
2020-08-30 13:51:34 +02:00
Rodolfo García Peñas (kix)
1bcd7d3d4d folder/Maildir.py Removed unused variables
These variables are not used.
2020-08-30 13:51:34 +02:00
Rodolfo García Peñas (kix)
91df77f69f folder/Maildir.py Updated docstrings 2020-08-30 13:51:29 +02:00
Rodolfo García Peñas (kix)
3d2692103f folder/Maildir.py changed not var in
This patch changes:

if not var1 in var2

with

if var1 not in var2
2020-08-30 13:42:09 +02:00
Rodolfo García Peñas (kix)
28910df6c2 folder/Maildir.py removed extra chars
I removed some extra ()
2020-08-30 13:40:14 +02:00
Rodolfo García Peñas (kix)
a1f907696f folder/LocalStatusSQLite.py split the if
This patch splits the if to avoid multiple commands in the same line.
2020-08-30 13:37:28 +02:00
Rodolfo García Peñas (kix)
8742ff4311 folder/LocalStatusSQLite.py changed not var in
This patch changes:

if not var1 in var2

with

if var1 not in var2
2020-08-30 13:36:40 +02:00
Rodolfo García Peñas (kix)
6059cf13ba folder/LocalStatusSQLite.py Removed extra chars
This patch removes the (). Are not needed.
2020-08-30 13:35:14 +02:00
Rodolfo García Peñas (kix)
5005de021d folder/LocalStatus.py split the if
This patch splits the if to avoid multiple commands in the same line.
2020-08-30 13:34:05 +02:00
Rodolfo García Peñas (kix)
b257cdca04 folder/LocalStatus.py Removed unused variables
These variables are not used.
2020-08-30 13:32:36 +02:00
Rodolfo García Peñas (kix)
dc8872377c folder/IMAP.py Removed unused variables
These variables are not used.
2020-08-30 13:30:39 +02:00
Rodolfo García Peñas (kix)
c3fe45ff2b folder/IMAP.py added docstrings arguments 2020-08-30 13:28:36 +02:00
Rodolfo García Peñas (kix)
88230bda47 folder/IMAP.py removed extra chars
This patch removes some backslash and (, )
2020-08-30 13:26:20 +02:00
Rodolfo García Peñas (kix)
9d93a6de8f folder/GmailMaildir.py changed not var in
This patch changes:

if not var1 in var2

with

if var1 not in var2
2020-08-30 13:23:07 +02:00
Rodolfo García Peñas (kix)
4facfacc48 folder/Gmail.py changed not var in
This patch changes not var in with var not in
2020-08-30 13:20:17 +02:00
Rodolfo García Peñas (kix)
e3533e7fa9 folder/Gmail.py Removed extra backslash
This backslash could be removed.
2020-08-30 13:19:27 +02:00
Rodolfo García Peñas (kix)
6be58c297d folder/Gmail.py added docstrings
This patch adds the docstrings
2020-08-30 13:18:18 +02:00
Rodolfo García Peñas (kix)
2ff748ac0e folder/Base.py Added docstrings params
This patch only adds some docstrings params.
2020-08-30 13:05:32 +02:00
Rodolfo García Peñas (kix)
1fc10875a6 folder/Base.py changed not var in
This patch changes:

if not var1 in var2

with

if var1 not in var2
2020-08-30 12:42:28 +02:00
Rodolfo García Peñas (kix)
56299086e2 folder/Base.py Removed extra parenthesis
This patch removes these extra characteres.
2020-08-30 12:40:28 +02:00
Rodolfo García Peñas (kix)
7b082f0fe9 offlineimap/folder files singleton-comparison
This patch change these errors in the 'folder' folder

C0121: Comparison to None should be 'expr is None' (singleton-comparison)
C0121: Comparison to None should be 'expr is not None' (singleton-comparison)
2020-08-30 11:15:00 +02:00
Rodolfo García Peñas (kix)
e77440552c Do not make object inheritance
This patch removes these lintian warnings:

Warning R0205: Class 'X' inherits from object,
can be safely removed from bases in python3 (useless-object-inheritance)
2020-08-29 21:44:18 +02:00
Rodolfo García Peñas (kix)
7d62441dc2 Changed import order
These changes close the lintian warning C0411.
2020-08-29 21:10:16 +02:00
Rodolfo García Peñas (kix)
b94983ee8a Removed extra line in offlineimap/folder/__init__.py
Removed extra line at EOF.
2020-08-29 20:41:27 +02:00
Rodolfo García Peñas (kix)
3a1b25c204 Reformat offlineimap/folder/UIDMaps.py
Add some spaces, remove lines,... now format is better (lintian).
2020-08-29 19:48:04 +02:00
Rodolfo García Peñas (kix)
eafd9eb51d Reformat offlineimap/folder/Maildir.py
Add some spaces, remove lines,... now format is better (lintian).
2020-08-29 19:46:43 +02:00
Rodolfo García Peñas (kix)
265de25460 Reformat offlineimap/folder/LocalStatusSQLite.py
Add some spaces, remove lines,... now format is better (lintian).
2020-08-29 19:45:15 +02:00
Rodolfo García Peñas (kix)
cb95bc87b0 Reformat offlineimap/folder/LocalStatus.py
Add some spaces, remove lines,... now format is better (lintian).
2020-08-29 19:43:52 +02:00
Rodolfo García Peñas (kix)
da1788db53 Reformat offlineimap/folder/IMAP.py
Add some spaces, remove lines,... now format is better (lintian).
2020-08-29 19:43:09 +02:00
Rodolfo García Peñas (kix)
2f97dda6d9 Reformat offlineimap/folder/GmailMaildir.py
Add some spaces, remove lines,... now format is better (lintian).
2020-08-29 19:42:20 +02:00
Rodolfo García Peñas (kix)
af18230a2a Reformat offlineimap/folder/Gmail.py
Add some spaces, remove lines,... now format is better (lintian).
2020-08-29 19:41:19 +02:00
Rodolfo García Peñas (kix)
9ebdbe47ee Reformat offlineimap/folder/Base.py
Add some spaces, remove lines,... now format is better (lintian).
2020-08-29 19:39:31 +02:00
Rodolfo García Peñas (kix)
18d2e972ac Mail now is typle of bytes convert to str
This patch saves the tuple and discard the bytes/str (now bytes).

Then, convert the tuple elements to str (from bytes).
2020-08-29 19:00:28 +02:00
Rodolfo García Peñas (kix)
7ba9ca1cca Maildir set is a builtin in python3
set() is a builtin, it is already included.
2020-08-29 09:22:23 +02:00
Rodolfo García Peñas (kix)
e61e77cf40 Convert bytes to string in IMAP folder
Convert the IMAP reply to string.
2020-08-28 17:25:06 +02:00
Rodolfo García Peñas (kix)
1379c32c5a IMAP do not use single quotes on fetch
The IMAP command is:

C: A654 FETCH 2:4 (FLAGS BODY[HEADER.FIELDS (DATE FROM)])

not

C: A654 FETCH '2:4' (FLAGS BODY[HEADER.FIELDS (DATE FROM)])

The single quotes must be removed.
2020-08-28 17:18:29 +02:00
Rodolfo García Peñas (kix)
bb5b1f2dcf Encode folder name before md5
Avoid the error:

Unicode-objects must be encoded before hashing
2020-08-28 16:51:11 +02:00
Rodolfo García Peñas (kix)
6ec6111896 2to3 main 2020-08-28 03:32:43 +02:00
Nicolas Sebrecht
fc61c6fd30 Gmail: allow parenthesis in labels
Reported-by Heinrich Hartmann <Heinrich@HeinrichHartmann.com>
Tested-by Heinrich Hartmann <Heinrich@HeinrichHartmann.com>
Github-ref: https://github.com/OfflineIMAP/offlineimap/issues/545
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2018-05-18 02:10:56 +02:00
Eygene Ryabinkin
3a807d0f2b Create filenames with no path separators in them
We use current hostname as the element of the unique file name.
Sometimes there is non-/24 zone delegation,
{{{
$ host 144.206.233.65
65.233.206.144.in-addr.arpa is an alias for 65.26/64.233.206.144.in-addr.arpa.
}}}
as per RFC 2317,
  https://www.rfc-editor.org/rfc/rfc2317.txt

So on Un*x systems we may run into having path separator inside
the file name.  Not good, things will choke.  Prevented this
by substituting all appeared path separators in the return value.

Signed-off-by: Eygene Ryabinkin <rea@codelabs.ru>
Tested-at: my MacOSX instance, my FreeBSD instances
2018-04-09 20:09:56 +03:00
Nicolas Sebrecht
e802f5fbd5 folder: IMAP: improve search logging
Log when exception occured during search command, too.

Github-ref: https://github.com/OfflineIMAP/offlineimap/issues/512
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2017-12-22 15:13:51 +01:00
John Ferlito
3c6b07b25f Add missing space to output string
It was previously printing "Upgrading LocalStatus cache from version 1to version 2 for XXX"

Signed-off-by: John Ferlito <johnf@inodes.org>
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2017-11-26 18:05:10 +01:00